读书人

求一select * from table where name

发布时间: 2012-01-28 22:06:14 作者: rapoo

求一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)

读书人网 >C#

热点推荐