首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

问这条SQL语句是什么东东? 关于 select * from table where ljth in(select .),请进入.

2012-01-14 
问这条SQL语句是什么错误? 关于 select * from table where ljth in(select ...),请进入...请问这条SQL语

问这条SQL语句是什么错误? 关于 select * from table where ljth in(select ...),请进入...
请问这条SQL语句是什么错误?  
select   *   from   aaa   where   ljth   in(select   ljth   from   aaa   group   by   lith   having   count(*)> 1);  
这是从aaa表中选出字段ljth有重复的记录,是正确的.但是:我在这条语句的基础上再加个条件比如说   ljmc   = 'sss ',如何写?
select   *   from   aaa   where   ljth   in(select   ljth   from   aaa   group   by   lith   having   count(*)> 1)   and   ljmc   = 'sss ';ljmc是表的字段名   ,这样写是错误的.请问如何写?

[解决办法]
沒錯誤啊,錯誤提示是什麼?

热点排行