A Guide to SQL
A Guide to SQL
9th Edition
ISBN: 9781111527273
Author: Philip J. Pratt
Publisher: Course Technology Ptr
Question
Book Icon
Chapter 8, Problem 7SCG
Program Plan Intro

Stored procedures:

  • A procedure is a collection of procedural and SQL statements.
  • A procedure may have input parameter, output parameter and both parameters.
  • It has a declared with a unique named with a unit of procedural code using the proprietary RDBMS and it is invoked by a host language library routine.

Syntax for stored procedure:

CREATE FUNCTION fun_name(argument IN data-type)RETRUN data-type[IS]

BEGIN

    PL/SQL statements;

    Return (value or expression);

END;

Blurred answer
Students have asked these similar questions
Write PL/SQL or T-SQL procedures to accomplish the following tasks: A: obtain the name and credit limit of the customer whose number currently is stored in I_CUSTOMER_NUM. Place these valuse in the variables I_CUSTOMER_NAME and I_CREDIT_LIMIT, respectively. Output the content of I_CUSTOMER_NAME and I_CREDIT_LIMIT. B: obtain the order date, customer number and name for the order whose number currently is stored in I_ORDER_NUM. place these values in the variables I_ORDER_DATE, I_CUSTOMER_NUM and I_CUSTOMER_NAME , respectively. output the contents of I_ORDER_DATE, I_CUSTOMER_NUM , and I_CUSTOMER_NAME. C: add a row to the ORDERS table. D: change the date of the whole number is stored in I_ORDER_DATE to the date currently found in I_ORDER_DATE. E: delete the order whose number is stored in I_ORDER_NUM.
Pl/sql Program to increase the salary of employee whose id is 400 based on the following conditions :If experience is more than 10 years, increase salary by 20%, if experience is greater than 5 years, increase salary by 10% otherwise 5%
Write a function and a call program in PL/SQL to sum the even integers between 1 and any number that is passed as parameter to the function. Use the editor to format your answer
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