Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle's query parameter syntax equivalent to @ in SQL's

Re: Oracle's query parameter syntax equivalent to @ in SQL's

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 3 May 2005 16:08:23 -0700
Message-ID: <1115161703.785694.124520@g14g2000cwa.googlegroups.com>


Sunny, in SQLPlus you can use substitution variables such as &empid and you will be prompted at run time for the value of the variable. See the SQLPlus accept command for a more user friendly way of prompting.

Within pl/sql you can just define and reference a variable such as v_empid and reference the pl/sql variable in the query: where empid = v_empid. Obviously you would need to supply v_empid with a value prior to using it.

>From a pro* language such as proc*c you would declare a variable and
then prefix it with a ":" so the variable would be :v_empid

Like Hans said it depends on the tool.

HTH -- Mark D Powell -- Received on Tue May 03 2005 - 18:08:23 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US