Subject | Re: [firebird-support] Distinct |
---|---|
Author | Milan Babuskov |
Post date | 2003-10-30T14:01:34Z |
Sandor Szollosi wrote:
select distinct FIELD1 from TBL1
union
select distinct FIELD2 from TBL1
--
Milan Babuskov
http://fbexport.sourceforge.net
> FIELD1, FIELD2I'm not sure if I did quite understand you, but try this:
> 1,1
> 1,2
> 2,1
> 2,2
>
> Result of
> "select distinct FIELD1 from TBL1":
> 1
> 2
>
> and result of
> "select distinct FIELD1,FIELD2 from TBL1":
> 1,1
> 1,2
> 2,1
> 2,2
>
> But I'd like to get two field in result and only two row.
> I don't mined which value will show in the second column
select distinct FIELD1 from TBL1
union
select distinct FIELD2 from TBL1
--
Milan Babuskov
http://fbexport.sourceforge.net