A Guide to SQL
A Guide to SQL
9th Edition
ISBN: 9781111527273
Author: Philip J. Pratt
Publisher: Course Technology Ptr
bartleby

Concept explainers

Question
Book Icon
Chapter 8, Problem 7CAT
Program Plan Intro

Stored procedures:

  • When user expect to running a particular query often, user can expand total performance by saving the query in a file called a stored procedure.
    • The stored procedure is located on the server.
    • The DBMS compiles the stored procedure and creates an execution plan, which is the well-organized method of finding the results.
  • It is a procedure which contains collection of procedural and SQL statements.

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
This question should be answered in PL/SQL only!   Create a procedure that takes instructor_ID as a parameter. Name it INSTR_SECTIONS. The procedure displays instructor first and last names, and also a list of sections that the instructor is scheduled to teach. Only one instructor per procedure call. You give/pass to a procedure instructor_ID as a parameter, the procedure prints INFO related only to that instructor.
By using this table answer this question in SQL : Write a SQL query, which shows a list of all employees last name, their department names and their department city where that department is located from the employees table.  If an employee does not belong to a department, then their department number and department name should show as “N/A” and their department city should show up as  “No City info Found”.  MAKE SURE you have all the employees displayed including the employees who do not have a department.
Find the service ID and property ID for each service request whose estimated hours is greater than the number of estimated hours of any service request with category number 5. in sql in cengage
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
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