在SQL server 2005 数据库表中什么语句可以过滤掉重复的内容
来源:百度知道 编辑:UC知道 时间:2024/06/08 18:52:51
distinct 函数
select distinct 列名 from 表
select * from table_name s1
where id not in (select max(id) from table_name s2 where s1.column =s2.column)
id一般为你的表的pk或是唯一字段
用这个函数distinct 就行了