Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Use of NULL in SELECT statement.
arvind popli enquired
> Do explain the usage of the following SELECT statement :
>
> SELECT NULL FROM <table_name>;
>
>Thanks,
>arvind.
>
It's quite simple , Arvind.
This select tests whether a row exists, but doesn't have the overhead
of retrieving a lot of data. If it's in a cursor, you can then test
if cursor%found (or %notfound) and take appropriate action. This sort
of select is very useful in a test e.g. is this code in use?
Different people use a different syntax - I always use select 'X'
to the same effect.
Hope that clarifies it somewhat
Best wishes
Malcolm Turner
Malcolm Turner
Developer,
Wellington Computer Systems
Belfast
Received on Sat Jan 27 1996 - 19:54:20 CST