使用SQL子查询实现查找唯一值

使用SQL子查询实现查找唯一值
复制if object_id(Test_Users) is not null   drop table Test_Users   go   create table Test_Users(AutoID int identity(1,使用1) primary key,UserGroupID int,UserName varchar(50))   go   set xact_abort on   begin tran   insert into Test_Users(UserGroupID,UserName)   select 2,aa union   select 2,bb union   select 3,cc union   select 1,Admin union   select 3,ff union   select 2,pp    commit tran   go   select * from Test_Users a   where UserGroupID not in   (select UserGroupID from Test_Users where AutoID<>a.AutoID)   1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.
应用开发
上一篇:电脑管家帮助你解决登陆错误问题(一键重启功能让你摆脱麻烦)
下一篇:如何去掉Word文档中的空白页?(简单有效的方法帮助您轻松处理Word文档中的无用空白页)