日期:2014-05-17  浏览次数:20750 次

急求大家看看这个sql语句问题在哪,急急急急急急急
sql= "select   *   from   table1   right   join   (select   *   from   table2   where   UserID=1   order   by   Addtile)   on   table2.qID=table1.ID   where   PassIF=1   order   by   eAnswer.Addtime   desc "

就是读出table2种所有userid为1的数据,然后那个qID就是table1中的id,现在就是读不出数据!

------解决方案--------------------
sql= "select * from table1 right join table2 on table2.qID=table1.ID where PassIF=1
and UserID=1 order by eAnswer,Addtime desc "