数据库结构的脚本: if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[TempA]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[TempA] GO CREATE TABLE [dbo].[TempA] ( [id] [int] IDENTITY (1, 1) NOT NULL , [PositionName] [varchar] (256) COLLATE Chinese_PRC_CI_AS NULL , &nbs...
采用的是下面的方法可删除,假设重复的是test数据库中的title字段 代码如下: create table bak as (select * from test group by title having count(*)=1); insert into bak (select * from test grou...