Page 1 of 1

Unique data query

Posted: Wed Dec 03, 2003 3:41 am
by ptysell
I have a database that looks something like this

M1 About
M1 Help
M1 LALALA
M2 ZZZ
M2 ZZZdgfdfsg
M3 alksdjfklasdj
M4 alsdkfjasjld
M4 asjfjlaskdf
ect...

I want a query that will just return

M1, M2, M3, M4, ect...

Thanks, i just am looking for something simple.

Posted: Wed Dec 03, 2003 3:45 am
by Nay
I'm guessing the table structure:

Code: Select all

the_m |  inside_the_m
M1 | About
M1 | Help
M1 | LALALA
M2 | ZZZ
M2 | ZZZdgfdfsg
M3 | alksdjfklasdj
M4 | alsdkfjasjld
M4 | asjfjlaskdf
You can do a query as:

Code: Select all

SELECT DISTINCT the_m FROM the_table
-Nay

Posted: Wed Dec 03, 2003 3:51 am
by ptysell
thanks

for some reason i was suck on the thought that it was

SELECT UNIQUE id FROM subsection

or something involving UNIQUE

Thanks