首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

求一select * from table where name = select from table 的语句例子.解决方法

2012-01-28 
求一select * from table where name select from table 的语句例子.求一select*fromtablewherenamesel

求一select * from table where name = select from table 的语句例子.
求一select   *   from   table   where   name   =   select   from   table   的语句例子.

[解决办法]
select * from table1 where name in (select name from table2)
[解决办法]
select * from table where name = select top 1 name from table2
[解决办法]
select * from table where name in (select name from table)
[解决办法]
select * from table1 where name in (select name from table2)

[解决办法]
select * from table where id= select max(ic) from table2
[解决办法]
select * from tablea where name in (select name from tablebB where name= 'aaa ')
[解决办法]
select * from table where name = select from table
当然不能这样写,一个值等于一个集合,会报错哈。
[解决办法]
select * from table1 where name in (select name from table2)
[解决办法]
select * from table1 a where exists (select 8 from table2 b where a.name = b.name)

热点排行