select top 1 ID from
(select ID,SName,UpTime
from R_User_Source,B_Source
where OwnerUID='2' and R_User_Source.RID=B_Source.RID) t
(select ID,SName,UpTime
from R_User_Source,B_Source
where OwnerUID='2' and R_User_Source.RID=B_Source.RID) t
调试欢乐多
(select ID,SName,UpTime
from R_User_Source,B_Source
where OwnerUID='2' and R_User_Source.RID=B_Source.RID) t
from R_User_Source,B_Source
where OwnerUID='2' and R_User_Source.RID=B_Source.RID select top 1 ID,SName,UpTime
from R_User_Source,B_Source
where OwnerUID='2' and R_User_Source.RID=B_Source.RID order by id select top 1 ID,SName,UpTime
from R_User_Source,B_Source
where OwnerUID='2' and R_User_Source.RID=B_Source.RID order by id desc
(select ID,SName,UpTime
from R_User_Source,B_Source
where OwnerUID='2' and R_User_Source.RID=B_Source.RID) a在后面加个表名就好了
select top 1 ID from
(select ID,SName,UpTime
from R_User_Source,B_Source
where OwnerUID='2' and R_User_Source.RID=B_Source.RID) afrom 后面跟关系结果
你的后面要加个表的别名
select top 1 ID from
(select ID,SName,UpTime
from R_User_Source,B_Source
where OwnerUID='2' and R_User_Source.RID=B_Source.RID) S
(select ID,SName,UpTime
from R_User_Source,B_Source
where OwnerUID='2' and R_User_Source.RID=B_Source.RID) A就可以, 给起一个别名