--这個? create table T(id int) insert into T select 1 insert into T select 2 insert into T select 3 insert into T select 4 insert into T select 5select a.id,b.id from T a,T b where a.id<b.id /* ------------ 1 2 1 3 2 3 1 4 2 4 3 4 1 5 2 5 3 5 4 5*/drop table T
--try select * from 表名 a join 表名 b on a.col<b.col
select a.col,b.col from (select col from table_name ) as a ,(select col from table_name) as b where a.col<b.col
create table T(id int)
insert into T select 1
insert into T select 2
insert into T select 3
insert into T select 4
insert into T select 5select a.id,b.id
from T a,T b
where a.id<b.id
/*
------------
1 2
1 3
2 3
1 4
2 4
3 4
1 5
2 5
3 5
4 5*/drop table T
select * from 表名 a join 表名 b on a.col<b.col
(select col from table_name ) as a ,(select col from table_name) as b
where a.col<b.col