数据库关联查询问题

table1的字段名:UpID UpName
Table2的字段名: DownId DownName UpId
两表通过UpId关联
现在知道DownId的值,如何通过一个sql语句查询出UpName的值?
---------------------------------------------------------------

sql="select UpName from table1 a,talbe2 b where a.UpID=b.UpID and b.DownID="&paramvalue

Published At
Categories with Web编程
comments powered by Disqus