1

Topic: How to remove identical lines

<Subj>
How probably to deduce only unique contents, being based on one column, i.e. it is had:
st01 | st02
aa | tra-lja-lja01
bb | tra-lja-lja02
aa | tra-lja-lja04
cc | tra-lja-lja03
aa | tra-lja-lja04
aa | tra-lja-lja05
, It is necessary to deduce only:
st01 | st02
aa | tra-lja-lja01
bb | tra-lja-lja02
cc | tra-lja-lja03
How it to organize, without resorting to means for example php, and to make it in only one request?

2

Re: How to remove identical lines

And something of type "SELECT DISTINCT st01, st02 from tab" does not help?

3

Re: How to remove identical lines

Yes, almost it, but how now  on the first column, instead of on the second or not on both  + to deduce all table?
"Select *, DISTINCT st1 from table" - it is impossible;
Can somehow through Where it is possible?
Or it is necessary to create the new temporary table?
By the way, many thanks - very much helped...

4

Re: How to remove identical lines

select _ group by ____
[img=http://www.sql.ru/forum/members/15392.jpg]