[thelist] SQL SELECT Question
Burhan Khalid
burhankhalid at members.evolt.org
Tue Dec 10 09:23:01 CST 2002
Hello All,
Recently I was asked a SQL question from a person new to SQL
that had me stumped -- because I had never thought of it before.
The question was, how do you write a select statement so it
returns only a list of all values in one column. The first thing
that came to my mind is the "SELECT * FROM [table]", but that
returns a list of all records, from all columns.
I then thought that if I gave a conditional that's always true,
it might work, ie. "SELECT someColumn FROM someTable WHERE 1=1",
but was told that it didn't work.
We eventually decided to go with SELECT *, and dump the data
that we didn't need, but the question has been bothering me for
a while. Anyone have any clues?
Regards,
--
*---------------*
| Burhan Khalid |
*---------------*---------------------------*
| Email : burhankhalid[at]members.evolt.org |
| Web : members.evolt.org/burhankhalid |
*-------------------------------------------*
More information about the thelist
mailing list