34,874
社区成员
发帖
与我相关
我的任务
分享select a.name as name1,b.name as name2 from tb a, tb b
where a.name<b.name
order by a.name--> 测试数据: [tb]
if object_id('[tb]') is not null drop table [tb]
create table [tb] (name varchar(1))
insert into [tb]
select 'a' union all
select 'b' union all
select 'c' union all
select 'd'
select * from [tb] a, tb b
where a.name<b.name
order by a.name