Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Student requests help with SQL
On 24 Apr 1998 13:43:22 GMT, nchan50315_at_aol.com (NChan50315)
wrote:
>1. How does the query SELECT 'X' FROM SUPPLIERS; work where X is any
>character string and SUPPLIERS is the table name? When I look at the results I
>understand what the query is doing but why and how does it do it? I want to
>understand the inner functioning of the query
If you are asking why you get an 'X' for each row, that's because SELECT normaly returns data for each row that matches its where clause. You can select a column, a function applied to a column, just a function, or a constant. In all cases, whatever you specify is evaluated and returned for each row.
>3. Do substitution variables (using &) in SQL*PLUS function similarly to the &
>address operator in C?
No. A substitition variable marks a place in a SQL*Plus script where text is substituted in at runtime. The effect is exactly the same as if you were to use an editor to do a search & replace on your script. The Oracle database never sees these variables at all, rather it sees the command after the substitution has been made.
I don't know the answers to the other questions you asked.
Jonathan Received on Fri Apr 24 1998 - 21:26:08 CDT