select 字段 from 表1 where ID=(select RID from 表2 where 时间>getdate())大概就是这样个意思   就算有错误 大家一看也知道我想弄个什么功能
谁帮改一下,谢谢
错误提示
子查询返回的值多于一个。当子查询跟随在 =、!=、<、<=、>、>= 之后,或子查询用作表达式时,这种情况是不允许的。语句已终止。

解决方案 »

  1.   

    select 字段 from 表1 where ID in (select RID from 表2 where 时间>getdate()) 
      

  2.   

    select 字段 from 表1 where ID in (select RID from 表2 where 时间>getdate()) 
      

  3.   

    --這樣效率更高.
    select 字段 from 表1,表2 where ID = RID and 表2.时间>getdate()
      

  4.   

    select 表1.字段 from 表1,表2 where 表1.ID = 表2.RID and 表2.时间>getdate()
      

  5.   


    select 字段 from 表1 where ID in (select RID from 表2 where 时间>getdate()) 
      

  6.   


    select 字段 from 表1 where ID in(select RID from 表2 where 时间>getdate())