x

What is the significance of the & and && operators in PL SQL ?

Signficance of the operators & and && in PLSQL.? Thank you in advance.

more ▼

asked Jan 13 '10 at 11:51 AM in Default

OracleApprender gravatar image

OracleApprender
771 68 73 75

There is no & and && operator in plsql. Never seen before.
Jan 13 '10 at 12:30 PM Christian13467
(comments are locked)
10|1200 characters needed characters left

3 answers: sort newest

The & operator means that the PL SQL block requires user input for a variable. The && operator means that the value of this variable should be the same as inputted by the user previously for this same variable.

more ▼

answered Jan 25 '10 at 07:23 AM

OracleApprender gravatar image

OracleApprender
771 68 73 75

(comments are locked)
10|1200 characters needed characters left

If you mean in SQL*Plus, then & and && are for substitution variables. If you use a single & then the value will be prompted for each time it's encountered. IF you use && then the original substitution value is used for the duration of the script

more ▼

answered Jan 13 '10 at 12:55 PM

HillbillyToad gravatar image

HillbillyToad
1k 2

(comments are locked)
10|1200 characters needed characters left

It's actually part of SQL*Plus - sort of a macro thing. Take a look at this:

SQL*Plus Helps

It allows you to - sort of - define a macro that prompts for values to be searched when you execute a particular statement.

more ▼

answered Jan 13 '10 at 01:46 PM

KillerDBA gravatar image

KillerDBA
1.5k 8 9 10

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x375
x15
x3

asked: Jan 13 '10 at 11:51 AM

Seen: 4368 times

Last Updated: Jan 13 '10 at 05:08 PM