A Guide to SQL
A Guide to SQL
9th Edition
ISBN: 9781111527273
Author: Philip J. Pratt
Publisher: Course Technology Ptr
Expert Solution & Answer
Book Icon
Chapter 8, Problem 11RQ

Explanation of Solution

Placing the results of a “SELECT” command into variables:

  • To place the results of a “SELECT” command into variables, “INTO” clause is used.
  • It can hold different set of variables and places the result in the corresponding variables.

Example:

/*Create a procedure*/

CREATE OR REPLACE PROCEDURE DISP_REP_NAME (I_REP_NAME IN REP.REF_NUM%TYPE) AS

/*Declaring the local variable*/

I_LASI_NAME REP.LAST_NAME%TYPE ;

I_FIRST_NAME REP...

Blurred answer
Students have asked these similar questions
How does the STUFF function help in manipulating string data in SQL?
I was wondering if you could do this in PL/SQL format. declare begin  end; etc
In what situations might the SOUNDEX function be useful in SQL when querying text data?
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    A Guide to SQL
    Computer Science
    ISBN:9781111527273
    Author:Philip J. Pratt
    Publisher:Course Technology Ptr
Text book image
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr