Page 1 :
1.Create emp table and dept table with appropriate field and apply table, constraints., , SQL*Plus: Release 10.2.0.3.0 - Production on Monday June 28 08:20:41 2021, Copyright (c) 1982, 2006, Oracle. All Rights Reserved., , Connected to:, Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production, With the Partitioning, OLAP and Data Mining options, , SQL> create table emp(eno number(3) primary key,ename char(10),eadd char(10),ecom, char(6) not null,esal number(6) check(esal between 10000 and 50000));, , Table created., , SQL> create table dept(dno number(3) primary key,dname char(8),dratio number(2) default, 4,eno number(3) references emp(eno));, , Table created.
Page 4 :
3. Use any table and do select operations using operators., SQL> create table dept(dno number(4) primary key,dname char(10));, Table created., SQL> insert into dept values(10,'production');, 1 row created., SQL> insert into dept values(20,'Account');, 1 row created., SQL> insert into dept values(30,'Sales');, 1 row created., SQL> select * from dept;, DNO DNAME, ---------- ---------10, production, 20, Account, 30, Sales, SQL> create table emp(eno number(4) primary key,ename char(7),ejob char(10),jdate date,esal, number(6),dno number(4) references dept(dno));, Table created., SQL> insert into emp values(1,'smith','clerk','17-Dec-80',800,20);, 1 row created., SQL> insert into emp values(2,'Allen','salesman','20-Feb-81',1600,30);, 1 row created., SQL> insert into emp values(3,'Jones','Manager','22-Feb-81',2975,20);, 1 row created., SQL> insert into emp values(4,'Martin','Salesman','28-Sep-81',1250,10);, 1 row created., SQL> insert into emp values(5,'Scott','Manager','19-Apr-87',3000,20);, 1 row created., SQL> select * from emp;, ENO, ENAME EJOB, JDATE, ESAL, DNO, ---------------- --------------------------- ---------1, smith clerk, 17-DEC-80, 800, 20, 2, Allen salesman 20-FEB-81, 1600, 30, 3, Jones Manager 22-FEB-81, 2975, 20, 4, Martin Salesman 28-SEP-81, 1250, 10, 5, Scott Manager 19-APR-87 3000, 20, SQL> select eno,ename from emp where dno in(10,20);, ENO ENAME, ---------------1, smith, 3, Jones, 4, Martin, 5, Scott