# Re: 请教一个SQL的查询方式?

Posted by John on October 25, 1999 at 17:48:31:

In Reply to: Re: 请教一个SQL的查询方式? posted by AOK(帝王世纪) on October 21, 1999 at 23:15:21:

: : 假如有两个TABLE A 及TABLE B.
: : TABLE A TABLE B
: : GOODS GOODS
: : ======= =======
: : 01 01
: : 02 03
: : 04 04
: : 07 06

: : 我想找到的结果是:谢谢大家!
: : GOODS
: : =======
: : 01
: : 02
: : 03
: : 04
: : 06
: : 07

: :: SELECT * FROM TABLEA ORDER BY asc

select distinct * from (select goods from tableA union
select goods from tableB) order by goods asc

Follow Ups: