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
Translate the following SQL query to a pandas statement in Python so that it can be executed on the pandas DataFrame.  SELECT COUNT(*) FROM sqldata WHERE cases > 1000 AND date = "2020-10-10";
Write a PL\SQL program to increase the salary of employee whose ID is 400 based on the following conditions: 17 experience is more than 10 years, increase salary by 20% If experience is greater than 5 years, increase salary by 10% Otherwise 5% en minutes remaining   .
We have employee table contains (emp-no, emp-name, emp-age, emp-salary, emp-department)write a pl/sql program to calculate the salary of the employees who has emp-no=101, and emp-no =102 ?
Knowledge Booster
Background pattern image
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
    Database Systems: Design, Implementation, & Manag...
    Computer Science
    ISBN:9781285196145
    Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
    Publisher:Cengage Learning
Text book image
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Cengage Learning