addnewauthor.sql
来自「介绍Oracle PL SQL编程」· SQL 代码 · 共 27 行
SQL
27 行
/*
* AddNewAuthor.sql
* Chapter 8, Oracle10g PL/SQL Programming
* by Ron Hardman, Mike McLaughlin, and Scott Urman
*
* This script demonstrates how to create and call a simple procedure.
*/
CREATE OR REPLACE PROCEDURE AddNewAuthor (
p_ID authors.ID%TYPE,
p_FirstName authors.first_name%TYPE,
p_LastName authors.last_name%TYPE) AS
BEGIN
-- Insert a new row into the authors table, using the supplied
-- arguments for the column values.
INSERT INTO authors (id, first_name, last_name)
VALUES (p_ID, p_FirstName, p_LastName);
END AddNewAuthor;
/
BEGIN
AddNewAuthor(100, 'Zelda', 'Zudnik');
END;
/
-- Roll back the insert so the example can be run again.
ROLLBACK;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?