Download primary key

Document related concepts

Registry of World Record Size Shells wikipedia , lookup

Serializability wikipedia , lookup

DBase wikipedia , lookup

Tandem Computers wikipedia , lookup

IMDb wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

Microsoft Access wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Btrieve wikipedia , lookup

Oracle Database wikipedia , lookup

Relational algebra wikipedia , lookup

Functional Database Model wikipedia , lookup

Ingres (database) wikipedia , lookup

Concurrency control wikipedia , lookup

Database wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

ContactPoint wikipedia , lookup

Database model wikipedia , lookup

Clusterpoint wikipedia , lookup

SQL wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Relational model wikipedia , lookup

PL/SQL wikipedia , lookup

Transcript
SQL Procedures
 The author_count function could instead be written as procedure:
create procedure account_count_proc (in title varchar(20),
out a_count integer)
begin
select count(author) into a_count
from depositor
where depositor.customer_name = account_count_proc.customer_name
end
 Procedures can be invoked either from an SQL procedure or from
embedded SQL, using the call statement.
declare a_count integer;
call account_count_proc( ‘Smith’, a_count);
Procedures and functions can be invoked also from dynamic SQL
 SQL:1999 allows more than one function/procedure of the same name
(called name overloading), as long as the number of
arguments differ, or at least the types of the arguments differ
Database System Concepts - 5th Edition, June 15, 2005
4.50
©Silberschatz, Korth and Sudarshan