










Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!











The DUAL table
SQL> desc dual; Name Null? Type
DUMMY VARCHAR2(1)
SQL> select * from dual;
D
X
SQL> select greatest(1,3,2) from dual;
3
SQL> select greatest(1,3,2) as max from dual;
3
Data manipulation in triggers using DUAL
SELECT
Adding a constant to tables
SQL> select * from userids;
john jack kate ben james**
SQL> select 'lost',userid from userids;
**'LOS USERID
lost john lost jack lost kate lost ben lost james**
SQL>
Suppliers(sid, sname, address) Parts(pid, pname, color) Catalog(sid, pid, cost)
Suppliers(sid, sname, address) Parts(pid, pname, color) Catalog(sid, pid, cost)
Suppliers(sid, sname, address) Parts(pid, pname, color) Catalog(sid, pid, cost)
Suppliers(sid, sname, address) Parts(pid, pname, color) Catalog(sid, pid, cost)
Schema
Flights(flno, from, to, distance, departs, arrives)
Aircraft(aid, aname, cruisingrange)
Certified(eid, aid)
Employees(eid, ename, salary)
Flights(flno, from, to, distance, departs, arrives, price) Aircraft(aid, aname, cruisingrange) Certified(eid, aid) Employees(eid, ename, salary)
Flights(flno, from, to, distance, departs, arrives) Aircraft(aid, aname, cruisingrange) Certified(eid, aid) Employees(eid, ename, salary)
Flights(flno, from, to, distance, departs, arrives) Aircraft(aid, aname, cruisingrange) Certified(eid, aid) Employees(eid, ename, salary)