select title,type,price,pub_id
from titles
where exists (select 1 from publishers where pub_name like 'new moon%' and titles.pub_id>pub_id)

解决方案 »

  1.   

    select title,type,price,pub_id
    from titles
    where pub_id>(select pub_id from publishers where pub_name like 'new moon%')
    我是教科书上讲的。
    大力的命令是没有问题。
    教科书的错在什么地方啊?
      

  2.   

    应为当"select pub_id from publishers where pub_name like 'new moon%'"返回一条记录的时候是对的,
    select title,type,price,pub_id from titles where pub_id>(select pub_id from publishers where pub_name like 'new moon%')
    这样写是只能比较子查循返回一条记录的情况,多条就错了!你的书可以丢掉了,哈哈。。开玩笑!
      

  3.   

    select pub_id from publishers where pub_name like 'new moon%'返回的是一条记录啊。真的。这时怎么回事呢
      

  4.   

    我这里是对的哟!你是2000吗??
    use pubs
    go
    select title,type,price,pub_id from titles where pub_id>(select pub_id from publishers where pub_name like 'new moon%')