文章分类 -  sql语句

摘要:一:查询1.查询出表中某个字段重复的记录select * from table where ttt in (selectttt from table group by ttt table where count(ttt)>1)2.查询表中字段和另一张表字段值相同的记录select * from table where ttt in (select ttt_1 from table_1 group by ttt_1 where count(ttt_1)>1 )3.查询出无重复记录的结果(例如:两条完全相同的记录,只取一条)select distinct * from table4查询 阅读全文
posted @ 2012-03-13 21:51 偶不是大叔 阅读(116) 评论(0) 推荐(0)