$ whois pl-sql
PL/SQL
first released in 1988 · by Oracle Corporation
$ guessprog --inspect pl-sql
- year
- 1988
- paradigm
- procedural
- family
- pascal
- memory
- automatic gc
- binding
- static
- safety
- strong
PL-SQL(7)
- AUTHORS
- Oracle Corporation
- HISTORY
- PL/SQL ("Procedural Language extensions to SQL") was created by Oracle Corporation to add variables, loops, conditionals and error handling to its SQL database. Its syntax was modelled on Ada, with the same block structure of declarations, a body and exception handlers. It first appeared at the end of the 1980s with version 6 of the Oracle database, and became the language for stored procedures, functions and triggers that run inside the database itself.
- USAGE
- Widely used wherever Oracle databases are, which means a great deal of enterprise, banking and government software. Much of it is legacy business logic, but PL/SQL remains a core skill for Oracle developers and DBAs.
- SEE ALSO
- PL/SQL on Wikipedia ↗
DECLARE
v_name emp.ename%TYPE;
BEGIN
SELECT ename INTO v_name FROM emp WHERE empno = 7839;
DBMS_OUTPUT.PUT_LINE('Boss: ' || v_name);
FOR e IN (SELECT ename, sal FROM emp WHERE deptno = 10) LOOP
DBMS_OUTPUT.PUT_LINE(e.ename || ' earns ' || e.sal);
END LOOP;
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE('No such employee');
END;
/