select 1 [message #296316] |
Fri, 25 January 2008 13:53  |
oraclehelen
Messages: 2 Registered: January 2008
|
Junior Member |
|
|
Hi,
I have a question about the SQL query, such as:
SELECT COUNT(a)
FROM tableA
WHERE a IS NOT NULL
AND EXISTS (SELECT 1 FROM tableB ...);
I would like to know what the "SELECT 1" means, is it equal to "SELECT *"?
Thanks for any replies.
Helen
|
|
|
|
|
|
Re: select 1 [message #296441 is a reply to message #296322] |
Sun, 27 January 2008 07:50   |
KrishnaBoppana
Messages: 12 Registered: March 2007 Location: Boston, MA
|
Junior Member |
|
|
It is just a little trick in SQL to satisfy the Select clause that requires some column to be specified. When used in conjunction with exists, your main goal is to get the results from the exists clause.
-Krishna
[Updated on: Sun, 27 January 2008 09:12] by Moderator Report message to a moderator
|
|
|
Re: select 1 [message #296447 is a reply to message #296441] |
Sun, 27 January 2008 09:12  |
 |
Michel Cadot
Messages: 68737 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
This a trick for what?
This post is once again meaningless.
Are you an expert in non-sense?
Regards
Michel
|
|
|