x
login about faq Site discussion (meta-askssc)

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
763 53 67 73

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
763 53 67 73

(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 5 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.

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



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x359
x13
x1

asked: Jan 13 '10 at 11:51 AM

Seen: 1974 times

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

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.