本帖最后由 tianya2297360 于 2011-10-20 14:29:27 编辑

解决方案 »

  1.   

    什么意思?几个表?为啥要查询这么多次。select title,code from test where code = '456';
    这个就可以获得所有的code为456 的title了。select * from test;
    这个可以获得所有的title和code
      

  2.   

    select title,code from test where title = (select title from test where code = '456');
      

  3.   

    select title,code from test where title = (select title from test where code = '456');
    正解
      

  4.   

    是正解么?
    如果有多个code = 456 的,那么用=还对么?即使用子查询也要用.select title,code from test where title in (select title from test where code = '456');