DECLARE @TAB TABLE( [科室编号] [varchar](50) NULL, [科室编码] [varchar](50) NULL, [科室名称] [varchar](50) NULL, [拼音] [varchar](50) NULL ) INSERT INTO @TAB SELECT * FROM Table_uvi_dept SELECT * FROM @TAB WHILE((SELECT COUNT([科室编号]) FROM @TAB)>0) BEGIN PRINT 1 DELETE @TAB WHERE [科室编号]=(SELECT TOP 1 [科室编号] from @TAB) END