使用SQL语句如何查询一个表中一个字段的值相同,另外一个字段的值不同?急!

日期:2019-07-29 16:25:59 人气:1

使用SQL语句如何查询一个表中一个字段的值相同,另外一个字段的值不同?急!

if object_id('table1') is not null begin drop table table1 end go create table table1 (a int ,b int) go insert into table1 select 1,1 union select 1,2 union select 1,3 union select 2,1 go SELECT a.* from table1
    A+
热门评论