Вы находитесь на странице: 1из 21

SQL> create table emp_71(Emp_no number(5),Dep_no number(5),Designation

varchar2(15),Name varchar2(15),Manager_SSN number(5),Salary number(10));

Table created.

SQL> insert into emp_71


values(&Emp_no,&Dep_no,'&Desigantion','&Name',&Manager_SSN,&Salary);
Enter value for emp_no: 100
Enter value for dep_no: 001
Enter value for desigantion: Prof
Enter value for name: Ross
Enter value for manager_ssn: 100
Enter value for salary: 1000
old 1: insert into emp_71
values(&Emp_no,&Dep_no,'&Desigantion','&Name',&Manager_SSN,&Salary)
new 1: insert into emp_71 values(100,001,'Prof','Ross',100,1000)

1 row created.

SQL> insert into emp_71


values(&Emp_no,&Dep_no,'&Desigantion','&Name',&Manager_SSN,&Salary);
Enter value for emp_no: 200
Enter value for dep_no: 002
Enter value for desigantion: Tranfunds
Enter value for name: Chandler
Enter value for manager_ssn: 500
Enter value for salary: 2000
old 1: insert into emp_71
values(&Emp_no,&Dep_no,'&Desigantion','&Name',&Manager_SSN,&Salary)
new 1: insert into emp_71 values(200,002,'Tranfunds','Chandler',500,2000)

1 row created.

SQL> insert into emp_71


values(&Emp_no,&Dep_no,'&Desigantion','&Name',&Manager_SSN,&Salary);
Enter value for emp_no: 300
Enter value for dep_no: 003
Enter value for desigantion: Prof
Enter value for name: Rachel
Enter value for manager_ssn: 300
Enter value for salary: 4000
old 1: insert into emp_71
values(&Emp_no,&Dep_no,'&Desigantion','&Name',&Manager_SSN,&Salary)
new 1: insert into emp_71 values(300,003,'Prof','Rachel',300,4000)

1 row created.

SQL> insert into emp_71


values(&Emp_no,&Dep_no,'&Desigantion','&Name',&Manager_SSN,&Salary);
Enter value for emp_no: 400
Enter value for dep_no: 004
Enter value for desigantion: Theatre
Enter value for name: Joey
Enter value for manager_ssn: 700
Enter value for salary: 5000
old 1: insert into emp_71
values(&Emp_no,&Dep_no,'&Desigantion','&Name',&Manager_SSN,&Salary)
new 1: insert into emp_71 values(400,004,'Theatre','Joey',700,5000)
1 row created.

SQL> insert into emp_71


values(&Emp_no,&Dep_no,'&Desigantion','&Name',&Manager_SSN,&Salary);
Enter value for emp_no: 500
Enter value for dep_no: 005
Enter value for desigantion: null
Enter value for name: null
Enter value for manager_ssn: null
Enter value for salary: null
old 1: insert into emp_71
values(&Emp_no,&Dep_no,'&Desigantion','&Name',&Manager_SSN,&Salary)
new 1: insert into emp_71 values(500,005,'null','null',null,null)

1 row created.

SQL> insert into emp_71


values(&Emp_no,&Dep_no,'&Desigantion','&Name',&Manager_SSN,&Salary);
Enter value for emp_no: 600
Enter value for dep_no: 006
Enter value for desigantion: Junior Assis
Enter value for name: Joel
Enter value for manager_ssn: 800
Enter value for salary: 10000
old 1: insert into emp_71
values(&Emp_no,&Dep_no,'&Desigantion','&Name',&Manager_SSN,&Salary)
new 1: insert into emp_71 values(600,006,'Junior Assis','Joel',800,10000)

1 row created.

SQL> commit;

Commit complete.

SQL> select * from emp_71;

EMP_NO DEP_NO DESIGNATION NAME MANAGER_SSN SALARY


---------- ---------- --------------- --------------- ----------- ----------
100 1 Prof Ross 100 1000
200 2 Tranfunds Chandler 500 2000
300 3 Prof Rachel 300 4000
400 4 Theatre Joey 700 5000
500 5 null null
600 6 Junior Assis Joel 800 10000

6 rows selected.

SQL> create table dept_71(Dep_no number(5),Dep_name varchar2(15),Manager_Name


varchar2(15),No_of_Employees number(5),Location varchar2(20));

Table created.

SQL> insert into dept_71


values(&Dept_no,'&Dept_name','&Manager_Name',&No_of_Employees,&Location);
Enter value for dept_no: 001
Enter value for dept_name: Ux
Enter value for manager_name: Ted
Enter value for no_of_employees: 10
Enter value for location: Stafford
old 1: insert into dept_71
values(&Dept_no,'&Dept_name','&Manager_Name',&No_of_Employees,&Location)
new 1: insert into dept_71 values(001,'Ux','Ted',10,Stafford)
insert into dept_71 values(001,'Ux','Ted',10,Stafford)
*
ERROR at line 1:
ORA-00984: column not allowed here

SQL> insert into dept_71


values(&Dept_no,'&Dept_name','&Manager_Name',&No_of_Employees,'&Location');
Enter value for dept_no: 001
Enter value for dept_name: Ux
Enter value for manager_name: Ted
Enter value for no_of_employees: 10
Enter value for location: Stafford
old 1: insert into dept_71
values(&Dept_no,'&Dept_name','&Manager_Name',&No_of_Employees,'&Location')
new 1: insert into dept_71 values(001,'Ux','Ted',10,'Stafford')

1 row created.

SQL> insert into dept_71


values(&Dept_no,'&Dept_name','&Manager_Name',&No_of_Employees,'&Location');
Enter value for dept_no: 002
Enter value for dept_name: Ui
Enter value for manager_name: Sheldo
Enter value for no_of_employees:
Enter value for location:
old 1: insert into dept_71
values(&Dept_no,'&Dept_name','&Manager_Name',&No_of_Employees,'&Location')
new 1: insert into dept_71 values(002,'Ui','Sheldo',,'')
insert into dept_71 values(002,'Ui','Sheldo',,'')
*
ERROR at line 1:
ORA-00936: missing expression

SQL> insert into dept_71


values(&Dept_no,'&Dept_name','&Manager_Name',&No_of_Employees,'&Location');
Enter value for dept_no: 002
Enter value for dept_name: Ui
Enter value for manager_name: Sheldon
Enter value for no_of_employees: 20
Enter value for location: Mabique
old 1: insert into dept_71
values(&Dept_no,'&Dept_name','&Manager_Name',&No_of_Employees,'&Location')
new 1: insert into dept_71 values(002,'Ui','Sheldon',20,'Mabique')

1 row created.

SQL> insert into dept_71


values(&Dept_no,'&Dept_name','&Manager_Name',&No_of_Employees,'&Location');
Enter value for dept_no: 003
Enter value for dept_name: Grpahics
Enter value for manager_name: Bamey
Enter value for no_of_employees: 23
Enter value for location: Kingdo
old 1: insert into dept_71
values(&Dept_no,'&Dept_name','&Manager_Name',&No_of_Employees,'&Location')
new 1: insert into dept_71 values(003,'Grpahics','Bamey',23,'Kingdo')

1 row created.

SQL> insert into dept_71


values(&Dept_no,'&Dept_name','&Manager_Name',&No_of_Employees,'&Location');
Enter value for dept_no: 004
Enter value for dept_name: Db
Enter value for manager_name: Robin
Enter value for no_of_employees: 50
Enter value for location: Hositan
old 1: insert into dept_71
values(&Dept_no,'&Dept_name','&Manager_Name',&No_of_Employees,'&Location')
new 1: insert into dept_71 values(004,'Db','Robin',50,'Hositan')

1 row created.

SQL> insert into dept_71


values(&Dept_no,'&Dept_name','&Manager_Name',&No_of_Employees,'&Location');
Enter value for dept_no: 005
Enter value for dept_name: Project mgt
Enter value for manager_name: lily
Enter value for no_of_employees: 60
Enter value for location: Brington
old 1: insert into dept_71
values(&Dept_no,'&Dept_name','&Manager_Name',&No_of_Employees,'&Location')
new 1: insert into dept_71 values(005,'Project mgt','lily',60,'Brington')

1 row created.

SQL> insert into dept_71


values(&Dept_no,'&Dept_name','&Manager_Name',&No_of_Employees,'&Location');
Enter value for dept_no: 006
Enter value for dept_name: Profic
Enter value for manager_name: Anne
Enter value for no_of_employees: 73
Enter value for location: Jacuqt
old 1: insert into dept_71
values(&Dept_no,'&Dept_name','&Manager_Name',&No_of_Employees,'&Location')
new 1: insert into dept_71 values(006,'Profic','Anne',73,'Jacuqt')

1 row created.

SQL> create table emp_per_det_71(Emp_no number(5),F name varchar2(15),L name


varchar2(15),City varchar2(10),Pin number(5),Dob date);
create table emp_per_det_71(Emp_no number(5),F name varchar2(15),L name
varchar2(15),City varchar2(10),Pin number(5),Dob date)
*
ERROR at line 1:
ORA-00907: missing right parenthesis

SQL> create table emp_per_det_71(Emp_no number(5),F name varchar2(15),L name


varchar2(15),City varchar2(10),Pin number(5),Dob date);
create table emp_per_det_71(Emp_no number(5),F name varchar2(15),L name
varchar2(15),City varchar2(10),Pin number(5),Dob date)
*
ERROR at line 1:
ORA-00907: missing right parenthesis

SQL> create table emp_per_det_71(Emp_no number(5),F name varchar2(15),L name


varchar2(15),City varchar2(10),Pin number(5),Dob date);
create table emp_per_det_71(Emp_no number(5),F name varchar2(15),L name
varchar2(15),City varchar2(10),Pin number(5),Dob date)
*
ERROR at line 1:
ORA-00907: missing right parenthesis

SQL> create table emp_per_det_71(Emp_no number(5),Fname varchar2(15),Lname


varchar2(15),City varchar2(10),Pin number(5),Dob date);

Table created.

SQL> insert into emp_per_det_71


values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'));
Enter value for emp_no: 100
Enter value for fname: ROSS
Enter value for lname:
Enter value for city:
Enter value for pin:
Enter value for dob:
old 1: insert into emp_per_det_71
values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'))
new 1: insert into emp_per_det_71 values(100,'ROSS','','',,to_date('','dd-mm-
yyyy'))
insert into emp_per_det_71 values(100,'ROSS','','',,to_date('','dd-mm-yyyy'))
*
ERROR at line 1:
ORA-00936: missing expression

SQL> insert into emp_per_det_71


values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'));
Enter value for emp_no: 100
Enter value for fname: Ross
Enter value for lname: Geller
Enter value for city: NYC
Enter value for pin: 123
Enter value for dob: 1-jan-1990
old 1: insert into emp_per_det_71
values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'))
new 1: insert into emp_per_det_71
values(100,'Ross','Geller','NYC',123,to_date('1-jan-1990','dd-mm-yyyy'))

1 row created.

SQL> insert into emp_per_det_71


values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'));
Enter value for emp_no: 200
Enter value for fname: Chandler
Enter value for lname: Bing
Enter value for city: NYC
Enter value for pin: 234
Enter value for dob: 2-feb-1985
old 1: insert into emp_per_det_71
values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'))
new 1: insert into emp_per_det_71
values(200,'Chandler','Bing','NYC',234,to_date('2-feb-1985','dd-mm-yyyy'))

1 row created.

SQL> insert into emp_per_det_71


values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'));
Enter value for emp_no: 300
Enter value for fname: Rachel
Enter value for lname: Green
Enter value for city: Paris
Enter value for pin: 678
Enter value for dob: 3-march-1983
old 1: insert into emp_per_det_71
values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'))
new 1: insert into emp_per_det_71
values(300,'Rachel','Green','Paris',678,to_date('3-march-1983','dd-mm-yyyy'))

1 row created.

SQL> insert into emp_per_det_71


values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'));
Enter value for emp_no: 400
Enter value for fname: Joey
Enter value for lname: Tribbiani
Enter value for city: Italy
Enter value for pin: 901
Enter value for dob: 4-april-1993
old 1: insert into emp_per_det_71
values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'))
new 1: insert into emp_per_det_71
values(400,'Joey','Tribbiani','Italy',901,to_date('4-april-1993','dd-mm-yyyy'))

1 row created.

SQL> insert into emp_per_det_71


values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'));
Enter value for emp_no: 500
Enter value for fname: null
Enter value for lname: null
Enter value for city: Null
Enter value for pin: null
Enter value for dob: null
old 1: insert into emp_per_det_71
values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'))
new 1: insert into emp_per_det_71
values(500,'null','null','Null',null,to_date('null','dd-mm-yyyy'))
insert into emp_per_det_71 values(500,'null','null','Null',null,to_date('null','dd-
mm-yyyy'))
*
ERROR at line 1:
ORA-01858: a non-numeric character was found where a numeric was expected

SQL> insert into emp_per_det_71


values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'));
Enter value for emp_no: 500
Enter value for fname:
Enter value for lname:
Enter value for city:
Enter value for pin:
Enter value for dob:
old 1: insert into emp_per_det_71
values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'))
new 1: insert into emp_per_det_71 values(500,'','','',,to_date('','dd-mm-yyyy'))
insert into emp_per_det_71 values(500,'','','',,to_date('','dd-mm-yyyy'))
*
ERROR at line 1:
ORA-00936: missing expression

SQL> insert into emp_per_det_71


values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'));
Enter value for emp_no: null
Enter value for fname:
Enter value for lname:
Enter value for city:
Enter value for pin:
Enter value for dob:
old 1: insert into emp_per_det_71
values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'))
new 1: insert into emp_per_det_71 values(null,'','','',,to_date('','dd-mm-yyyy'))
insert into emp_per_det_71 values(null,'','','',,to_date('','dd-mm-yyyy'))
*
ERROR at line 1:
ORA-00936: missing expression

SQL> insert into emp_per_det_71


values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'));
Enter value for emp_no: 500
Enter value for fname: null
Enter value for lname: nul
Enter value for city: null
Enter value for pin: null
Enter value for dob: null
old 1: insert into emp_per_det_71
values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'))
new 1: insert into emp_per_det_71
values(500,'null','nul','null',null,to_date('null','dd-mm-yyyy'))
insert into emp_per_det_71 values(500,'null','nul','null',null,to_date('null','dd-
mm-yyyy'))
*
ERROR at line 1:
ORA-01858: a non-numeric character was found where a numeric was expected

SQL> insert into emp_per_det_71


values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'));
Enter value for emp_no: 500
Enter value for fname: null
Enter value for lname: null
Enter value for city: null
Enter value for pin: null
Enter value for dob: nll
old 1: insert into emp_per_det_71
values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'))
new 1: insert into emp_per_det_71
values(500,'null','null','null',null,to_date('nll','dd-mm-yyyy'))
insert into emp_per_det_71 values(500,'null','null','null',null,to_date('nll','dd-
mm-yyyy'))
*
ERROR at line 1:
ORA-01858: a non-numeric character was found where a numeric was expected

SQL> insert into emp_per_det_71


values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'));
Enter value for emp_no: 500
Enter value for fname: null
Enter value for lname: null
Enter value for city: null
Enter value for pin: null
Enter value for dob: nll
old 1: insert into emp_per_det_71
values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'))
new 1: insert into emp_per_det_71
values(500,'null','null','null',null,to_date('nll','dd-mm-yyyy'))
insert into emp_per_det_71 values(500,'null','null','null',null,to_date('nll','dd-
mm-yyyy'))
*
ERROR at line 1:
ORA-01858: a non-numeric character was found where a numeric was expected

SQL> insert into emp_per_det_71


values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'));
Enter value for emp_no: 500
Enter value for fname: null
Enter value for lname: null
Enter value for city: null
Enter value for pin: null
Enter value for dob: null
old 1: insert into emp_per_det_71
values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'))
new 1: insert into emp_per_det_71
values(500,'null','null','null',null,to_date('null','dd-mm-yyyy'))
insert into emp_per_det_71 values(500,'null','null','null',null,to_date('null','dd-
mm-yyyy'))
*
ERROR at line 1:
ORA-01858: a non-numeric character was found where a numeric was expected

SQL> insert into emp_per_det_71


values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'));
Enter value for emp_no: 500
Enter value for fname: null
Enter value for lname: null
Enter value for city: null
Enter value for pin: null
Enter value for dob: null
old 1: insert into emp_per_det_71
values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'))
new 1: insert into emp_per_det_71
values(500,'null','null','null',null,to_date('null','dd-mm-yyyy'))
insert into emp_per_det_71 values(500,'null','null','null',null,to_date('null','dd-
mm-yyyy'))
*
ERROR at line 1:
ORA-01858: a non-numeric character was found where a numeric was expected

SQL> insert into emp_per_det_71


values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'));
Enter value for emp_no: 500
Enter value for fname: null
Enter value for lname: null
Enter value for city: null
Enter value for pin: null
Enter value for dob: null
old 1: insert into emp_per_det_71
values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'))
new 1: insert into emp_per_det_71
values(500,'null','null','null',null,to_date('null','dd-mm-yyyy'))
insert into emp_per_det_71 values(500,'null','null','null',null,to_date('null','dd-
mm-yyyy'))
*
ERROR at line 1:
ORA-01858: a non-numeric character was found where a numeric was expected

SQL> insert into emp_per_det_71 values(500,null,null,null,null,null);

1 row created.

SQL> insert into emp_per_det_71


values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'));
Enter value for emp_no: 600
Enter value for fname: Joel
Enter value for lname: Roy
Enter value for city: France
Enter value for pin: 546
Enter value for dob: 5-jan-1987
old 1: insert into emp_per_det_71
values(&Emp_no,'&Fname','&Lname','&City',&Pin,to_date('&Dob','dd-mm-yyyy'))
new 1: insert into emp_per_det_71
values(600,'Joel','Roy','France',546,to_date('5-jan-1987','dd-mm-yyyy'))

1 row created.

SQL> create table sal_det_71(Empno number(5),Salary number(10),Grosspay


number(10),Netpay number(10));

Table created.

SQL> insert into sal_det_71 values(&Empno,&Salary,&Grosspay,&Netpay);


Enter value for empno: 100
Enter value for salary: 1000
Enter value for grosspay: 10000
Enter value for netpay: 30000
old 1: insert into sal_det_71 values(&Empno,&Salary,&Grosspay,&Netpay)
new 1: insert into sal_det_71 values(100,1000,10000,30000)

1 row created.
SQL> insert into sal_det_71 values(&Empno,&Salary,&Grosspay,&Netpay);
Enter value for empno: 200
Enter value for salary: 2000
Enter value for grosspay: 20000
Enter value for netpay: 20000
old 1: insert into sal_det_71 values(&Empno,&Salary,&Grosspay,&Netpay)
new 1: insert into sal_det_71 values(200,2000,20000,20000)

1 row created.

SQL> insert into sal_det_71 values(&Empno,&Salary,&Grosspay,&Netpay);


Enter value for empno: 300
Enter value for salary: 4000
Enter value for grosspay: 50000
Enter value for netpay: 50000
old 1: insert into sal_det_71 values(&Empno,&Salary,&Grosspay,&Netpay)
new 1: insert into sal_det_71 values(300,4000,50000,50000)

1 row created.

SQL> insert into sal_det_71 values(&Empno,&Salary,&Grosspay,&Netpay);


Enter value for empno: 500
Enter value for salary: null
Enter value for grosspay: null
Enter value for netpay: null
old 1: insert into sal_det_71 values(&Empno,&Salary,&Grosspay,&Netpay)
new 1: insert into sal_det_71 values(500,null,null,null)

1 row created.

SQL> insert into sal_det_71 values(&Empno,&Salary,&Grosspay,&Netpay);


Enter value for empno: 600
Enter value for salary: 10000
Enter value for grosspay: 67000
Enter value for netpay: 43000
old 1: insert into sal_det_71 values(&Empno,&Salary,&Grosspay,&Netpay)
new 1: insert into sal_det_71 values(600,10000,67000,43000)

1 row created.

SQL> insert into sal_det_71 values(&Empno,&Salary,&Grosspay,&Netpay);


Enter value for empno: 400
Enter value for salary: 5000
Enter value for grosspay: 60000
Enter value for netpay: 90000
old 1: insert into sal_det_71 values(&Empno,&Salary,&Grosspay,&Netpay)
new 1: insert into sal_det_71 values(400,5000,60000,90000)

1 row created.

SQL> select * from sal_det_71;

EMPNO SALARY GROSSPAY NETPAY


---------- ---------- ---------- ----------
100 1000 10000 30000
200 2000 20000 20000
300 4000 50000 50000
500
600 10000 67000 43000
400 5000 60000 90000

6 rows selected.

SQL> select * from emp_per_det_71;

EMP_NO FNAME LNAME CITY PIN DOB


---------- --------------- --------------- ---------- ---------- ---------
100 Ross Geller NYC 123 01-JAN-90
200 Chandler Bing NYC 234 02-FEB-85
300 Rachel Green Paris 678 03-MAR-83
400 Joey Tribbiani Italy 901 04-APR-93
500
600 Joel Roy France 546 05-JAN-87

6 rows selected.

SQL> select
2 *
3
SQL> select * from dept_71;

DEP_NO DEP_NAME MANAGER_NAME NO_OF_EMPLOYEES LOCATION


---------- --------------- --------------- --------------- --------------------
1 Ux Ted 10 Stafford
2 Ui Sheldon 20 Mabique
3 Grpahics Bamey 23 Kingdo
4 Db Robin 50 Hositan
5 Project mgt lily 60 Brington
6 Profic Anne 73 Jacuqt

6 rows selected.

SQL> select
2
SQL>
SQL> select * from emp_71;

EMP_NO DEP_NO DESIGNATION NAME MANAGER_SSN SALARY


---------- ---------- --------------- --------------- ----------- ----------
100 1 Prof Ross 100 1000
200 2 Tranfunds Chandler 500 2000
300 3 Prof Rachel 300 4000
400 4 Theatre Joey 700 5000
500 5 null null
600 6 Junior Assis Joel 800 10000

6 rows selected.

SQL> commit
2
SQL> commit;

Commit complete.

SQL> update emp_71 set DESIGNATION='null' ;

6 rows updated.
SQL> select * from emp_71;

EMP_NO DEP_NO DESIGNATION NAME MANAGER_SSN SALARY


---------- ---------- --------------- --------------- ----------- ----------
100 1 null Ross 100 1000
200 2 null Chandler 500 2000
300 3 null Rachel 300 4000
400 4 null Joey 700 5000
500 5 null null
600 6 null Joel 800 10000

6 rows selected.

SQL> upadte emp_71 set DESIGANTION='Prof' where DESIGNATION='null';


SP2-0734: unknown command beginning "upadte emp..." - rest of line ignored.
SQL> update emp_71 set DESIGNATION='Prof' where DESIGNATION='null';

6 rows updated.

SQL> update emp_71 set DESIGNATION='Prof' where EMP_NO=100;

1 row updated.

SQL> update emp_71 set DESIGNATION='Tranfunds' where EMP_NO=200;

1 row updated.

SQL> update emp_71 set DESIGNATION='Prof' where EMP_NO=300;

1 row updated.

SQL> update emp_71 set DESIGNATION='Theatre' where EMP_NO=400;

1 row updated.

SQL> update emp_71 set DESIGNATION='null' where EMP_NO=500;

1 row updated.

SQL> update emp_71 set DESIGNATION='Junior Assis' where EMP_NO=600;

1 row updated.

SQL> select * from emp_71;

EMP_NO DEP_NO DESIGNATION NAME MANAGER_SSN SALARY


---------- ---------- --------------- --------------- ----------- ----------
100 1 Prof Ross 100 1000
200 2 Tranfunds Chandler 500 2000
300 3 Prof Rachel 300 4000
400 4 Theatre Joey 700 5000
500 5 null null
600 6 Junior Assis Joel 800 10000

6 rows selected.

SQL> select EMP_NO,MANAGER_SSN,DEPT_NAME FROM EMP_71 E,DEPT_71 D WHERE


E.DEPT_NO=D.DEPT_NO AND (SELECT MIN(NO_OF_EMPLOYEES)));
select EMP_NO,MANAGER_SSN,DEPT_NAME FROM EMP_71 E,DEPT_71 D WHERE
E.DEPT_NO=D.DEPT_NO AND (SELECT MIN(NO_OF_EMPLOYEES)))

*
ERROR at line 1:
ORA-00936: missing expression

SQL> select EMP_NO,MANAGER_SSN,DEPT_NAME FROM EMP_71 E,DEPT_71 D WHERE


E.DEPT_NO=D.DEPT_NO AND (SELECT MIN(NO_OF_EMPLOYEES FROM DEPT_71)));
select EMP_NO,MANAGER_SSN,DEPT_NAME FROM EMP_71 E,DEPT_71 D WHERE
E.DEPT_NO=D.DEPT_NO AND (SELECT MIN(NO_OF_EMPLOYEES FROM DEPT_71)))

*
ERROR at line 1:
ORA-00936: missing expression

SQL> select EMP_NO,MANAGER_SSN,DEPT_NAME FROM EMP_71 E,DEPT_71 D WHERE


E.DEPT_NO=D.DEPT_NO AND (SELECT MIN(NO_OF_EMPLOYEES FROM DEPT_71));
select EMP_NO,MANAGER_SSN,DEPT_NAME FROM EMP_71 E,DEPT_71 D WHERE
E.DEPT_NO=D.DEPT_NO AND (SELECT MIN(NO_OF_EMPLOYEES FROM DEPT_71))

*
ERROR at line 1:
ORA-00936: missing expression

SQL> select EMP_NO,MANAGER_SSN,DEPT_NAME FROM EMP_71 E,DEPT_71 D WHERE


E.DEPT_NO=D.DEPT_NO AND (SELECT MIN(NO_OF_EMPLOYEES FROM DEPT_71));
select EMP_NO,MANAGER_SSN,DEPT_NAME FROM EMP_71 E,DEPT_71 D WHERE
E.DEPT_NO=D.DEPT_NO AND (SELECT MIN(NO_OF_EMPLOYEES FROM DEPT_71))

*
ERROR at line 1:
ORA-00936: missing expression

SQL> DESC EMP_71;


Name Null? Type
----------------------------------------- -------- ----------------------------
EMP_NO NUMBER(5)
DEP_NO NUMBER(5)
DESIGNATION VARCHAR2(15)
NAME VARCHAR2(15)
MANAGER_SSN NUMBER(5)
SALARY NUMBER(10)

SQL> DESC DEPT_71;


Name Null? Type
----------------------------------------- -------- ----------------------------
DEP_NO NUMBER(5)
DEP_NAME VARCHAR2(15)
MANAGER_NAME VARCHAR2(15)
NO_OF_EMPLOYEES NUMBER(5)
LOCATION VARCHAR2(20)

SQL> DESC EMP_PER_DET_71;


Name Null? Type
----------------------------------------- -------- ----------------------------
EMP_NO NUMBER(5)
FNAME VARCHAR2(15)
LNAME VARCHAR2(15)
CITY VARCHAR2(10)
PIN NUMBER(5)
DOB DATE

SQL> DESC SAL_DET_71;


Name Null? Type
----------------------------------------- -------- ----------------------------
EMPNO NUMBER(5)
SALARY NUMBER(10)
GROSSPAY NUMBER(10)
NETPAY NUMBER(10)

SQL> select E.EMP_NO,E.MANAGER_SSN,D.DEPT_NAME FROM EMP_71 E,DEPT_71 D WHERE


E.DEPT_NO=D.DEPT_NO AND (SELECT MIN(NO_OF_EMPLOYEES FROM DEPT_71));
select E.EMP_NO,E.MANAGER_SSN,D.DEPT_NAME FROM EMP_71 E,DEPT_71 D WHERE
E.DEPT_NO=D.DEPT_NO AND (SELECT MIN(NO_OF_EMPLOYEES FROM DEPT_71))

*
ERROR at line 1:
ORA-00936: missing expression

SQL> select E.EMP_NO,E.MANAGER_SSN,D.DEPT_NAME FROM EMP_71 E,DEPT_71 D WHERE


E.DEPT_NO=D.DEPT_NO AND D.NO_OF_EMPLOYEES= (SELECT MIN(NO_OF_EMPLOYEES FROM
DEPT_71));
select E.EMP_NO,E.MANAGER_SSN,D.DEPT_NAME FROM EMP_71 E,DEPT_71 D WHERE
E.DEPT_NO=D.DEPT_NO AND D.NO_OF_EMPLOYEES= (SELECT MIN(NO_OF_EMPLOYEES FROM
DEPT_71))

*
ERROR at line 1:
ORA-00907: missing right parenthesis

SQL> select E.EMP_NO,E.MANAGER_SSN,D.DEPT_NAME FROM EMP_71 E,DEPT_71 D WHERE


E.DEPT_NO=D.DEPT_NO AND D.NO_OF_EMPLOYEES= (SELECT MIN(NO_OF_EMPLOYEES FROM
DEPT_71)));
select E.EMP_NO,E.MANAGER_SSN,D.DEPT_NAME FROM EMP_71 E,DEPT_71 D WHERE
E.DEPT_NO=D.DEPT_NO AND D.NO_OF_EMPLOYEES= (SELECT MIN(NO_OF_EMPLOYEES FROM
DEPT_71)))

*
ERROR at line 1:
ORA-00907: missing right parenthesis

SQL> select E.EMP_NO,E.MANAGER_SSN,D.DEPT_NAME FROM EMP_71 E,DEPT_71 D WHERE


E.DEPT_NO=D.DEPT_NO AND D.NO_OF_EMPLOYEES= (SELECT MIN(NO_OF_EMPLOYEES) FROM
DEPT_71)));
select E.EMP_NO,E.MANAGER_SSN,D.DEPT_NAME FROM EMP_71 E,DEPT_71 D WHERE
E.DEPT_NO=D.DEPT_NO AND D.NO_OF_EMPLOYEES= (SELECT MIN(NO_OF_EMPLOYEES) FROM
DEPT_71)))

*
ERROR at line 1:
ORA-00933: SQL command not properly ended

SQL> select E.EMP_NO,E.MANAGER_SSN,D.DEPT_NAME FROM EMP_71 E,DEPT_71 D WHERE


E.DEPT_NO=D.DEPT_NO AND D.NO_OF_EMPLOYEES= (SELECT MIN(NO_OF_EMPLOYEES) FROM
DEPT_71);
select E.EMP_NO,E.MANAGER_SSN,D.DEPT_NAME FROM EMP_71 E,DEPT_71 D WHERE
E.DEPT_NO=D.DEPT_NO AND D.NO_OF_EMPLOYEES= (SELECT MIN(NO_OF_EMPLOYEES) FROM
DEPT_71)
*
ERROR at line 1:
ORA-00904: "D"."DEPT_NO": invalid identifier

SQL> select E.EMP_NO,E.MANAGER_SSN,D.DEPT_NAME FROM EMP_71 E,DEPT_71 D WHERE


E.DEP_NO=D.DEP_NO AND D.NO_OF_EMPLOYEES= (SELECT MIN(NO_OF_EMPLOYEES) FROM
DEPT_71);
select E.EMP_NO,E.MANAGER_SSN,D.DEPT_NAME FROM EMP_71 E,DEPT_71 D WHERE
E.DEP_NO=D.DEP_NO AND D.NO_OF_EMPLOYEES= (SELECT MIN(NO_OF_EMPLOYEES) FROM DEPT_71)
*
ERROR at line 1:
ORA-00904: "D"."DEPT_NAME": invalid identifier

SQL> select E.EMP_NO,E.MANAGER_SSN,D.DEP_NAME FROM EMP_71 E,DEPT_71 D WHERE


E.DEP_NO=D.DEP_NO AND D.NO_OF_EMPLOYEES= (SELECT MIN(NO_OF_EMPLOYEES) FROM
DEPT_71);

EMP_NO MANAGER_SSN DEP_NAME


---------- ----------- ---------------
100 100 Ux

SQL> SELECT D.DEP_NO,D.MANAGER_NAME,D.NO_OF_EMPLOYEES FROM DEPT_71 D,EMP_71 E WHERE


D.DEP_NO=E.DEP_NO AND E.SALARY=(SELECT SALARY WHERE NAME=MAX(SALARY WHERE
ANME='Rachel'));
SELECT D.DEP_NO,D.MANAGER_NAME,D.NO_OF_EMPLOYEES FROM DEPT_71 D,EMP_71 E WHERE
D.DEP_NO=E.DEP_NO AND E.SALARY=(SELECT SALARY WHERE NAME=MAX(SALARY WHERE
ANME='Rachel'))

*
ERROR at line 1:
ORA-00923: FROM keyword not found where expected

SQL> SELECT D.DEP_NO,D.MANAGER_NAME,D.NO_OF_EMPLOYEES FROM DEPT_71 D,EMP_71 E WHERE


D.DEP_NO=E.DEP_NO AND E.SALARY=(SELECT SALARY WHERE NAME=MAX(SALARY WHERE
ANME='Rachel')FROM EMP_71);
SELECT D.DEP_NO,D.MANAGER_NAME,D.NO_OF_EMPLOYEES FROM DEPT_71 D,EMP_71 E WHERE
D.DEP_NO=E.DEP_NO AND E.SALARY=(SELECT SALARY WHERE NAME=MAX(SALARY WHERE
ANME='Rachel')FROM EMP_71)

*
ERROR at line 1:
ORA-00923: FROM keyword not found where expected

SQL> SELECT D.DEP_NO,D.MANAGER_NAME,D.NO_OF_EMPLOYEES FROM DEPT_71 D,EMP_71 E WHERE


D.DEP_NO=E.DEP_NO AND E.SALARY>(SELECT E.SALARY FROM EMP_71 WHERE NAME='Rachel'));
SELECT D.DEP_NO,D.MANAGER_NAME,D.NO_OF_EMPLOYEES FROM DEPT_71 D,EMP_71 E WHERE
D.DEP_NO=E.DEP_NO AND E.SALARY>(SELECT E.SALARY FROM EMP_71 WHERE NAME='Rachel'))

*
ERROR at line 1:
ORA-00933: SQL command not properly ended

SQL> SELECT D.DEP_NO,D.MANAGER_NAME,D.NO_OF_EMPLOYEES FROM DEPT_71 D,EMP_71 E WHERE


D.DEP_NO=E.DEP_NO AND E.SALARY>(SELECT SALARY FROM EMP_71 WHERE NAME='Rachel'));
SELECT D.DEP_NO,D.MANAGER_NAME,D.NO_OF_EMPLOYEES FROM DEPT_71 D,EMP_71 E WHERE
D.DEP_NO=E.DEP_NO AND E.SALARY>(SELECT SALARY FROM EMP_71 WHERE NAME='Rachel'))

*
ERROR at line 1:
ORA-00933: SQL command not properly ended

SQL> SELECT D.DEP_NO,D.MANAGER_NAME,D.NO_OF_EMPLOYEES FROM DEPT_71 D,EMP_71 E WHERE


D.DEP_NO=E.DEP_NO AND E.SALARY>(SELECT SALARY FROM EMP_71 WHERE NAME='Rachel'));
SELECT D.DEP_NO,D.MANAGER_NAME,D.NO_OF_EMPLOYEES FROM DEPT_71 D,EMP_71 E WHERE
D.DEP_NO=E.DEP_NO AND E.SALARY>(SELECT SALARY FROM EMP_71 WHERE NAME='Rachel'))

*
ERROR at line 1:
ORA-00933: SQL command not properly ended

SQL> SELECT D.DEP_NO,D.MANAGER_NAME,D.NO_OF_EMPLOYEES FROM DEPT_71 D,EMP_71 E WHERE


D.DEP_NO=E.DEP_NO AND E.SALARY>(SELECT SALARY FROM EMP_71 WHERE NAME='Rachel');

DEP_NO MANAGER_NAME NO_OF_EMPLOYEES


---------- --------------- ---------------
4 Robin 50
6 Anne 73

SQL> select E.NAME FROM EMP_71 E,DEPT_71 D WHERE E.DEP_NO=D.DEP_NO AND


E.NO_OF_EMPLOYEES=(SELECT MAX(NO_OF_EMPLOYEES) FROM DEPT_71);
select E.NAME FROM EMP_71 E,DEPT_71 D WHERE E.DEP_NO=D.DEP_NO AND
E.NO_OF_EMPLOYEES=(SELECT MAX(NO_OF_EMPLOYEES) FROM DEPT_71)
*
ERROR at line 1:
ORA-00904: "E"."NO_OF_EMPLOYEES": invalid identifier

SQL> select E.NAME,D.MANAGER_NAME FROM EMP_71 E,DEPT_71 D WHERE E.DEP_NO=D.DEP_NO


AND D.NO_OF_EMPLOYEES=(SELECT MAX(NO_OF_EMPLOYEES) FROM DEPT_71);

NAME MANAGER_NAME
--------------- ---------------
Joel Anne

SQL> select E.NAME FROM EMP_71 E,DEPT_71 D WHERE E.DEP_NO=D.DEP_NO AND


D.NO_OF_EMPLOYEES=(SELECT MAX(NO_OF_EMPLOYEES) FROM DEPT_71);

NAME
---------------
Joel

SQL> select E.NAME FROM EMP_71 E,DEPT_71 D WHERE D.NO_OF_EMPLOYEES=(SELECT


MAX(NO_OF_EMPLOYEES) FROM DEPT_71);

NAME
---------------
Ross
Chandler
Rachel
Joey
null
Joel

6 rows selected.

SQL> SELECT D.DEP_NAME FROM DEPT_71 D WHERE D.NO_OF_EMPLOYEES=0;

no rows selected

SQL> SELECT D.DEP_NO ,D.DEP_NAME FROM DEPT_71 D,EMP_71 E WHERE E.DEP_NO=D.DEP_NO


AND D.NO_OF_EMPLOYEES=0 AND E.SALARY=SELECT(MAX(SALARY) FROM EMP_71);
SELECT D.DEP_NO ,D.DEP_NAME FROM DEPT_71 D,EMP_71 E WHERE E.DEP_NO=D.DEP_NO AND
D.NO_OF_EMPLOYEES=0 AND E.SALARY=SELECT(MAX(SALARY) FROM EMP_71)

*
ERROR at line 1:
ORA-00936: missing expression

SQL> SELECT D.DEP_NO ,D.DEP_NAME FROM DEPT_71 D,EMP_71 E WHERE E.DEP_NO=D.DEP_NO


AND D.NO_OF_EMPLOYEES=0 AND E.SALARY=(SELECT(MAX(SALARY) FROM EMP_71));
SELECT D.DEP_NO ,D.DEP_NAME FROM DEPT_71 D,EMP_71 E WHERE E.DEP_NO=D.DEP_NO AND
D.NO_OF_EMPLOYEES=0 AND E.SALARY=(SELECT(MAX(SALARY) FROM EMP_71))

*
ERROR at line 1:
ORA-00907: missing right parenthesis

SQL> SELECT D.DEP_NO ,D.DEP_NAME FROM DEPT_71 D,EMP_71 E WHERE D.NO_OF_EMPLOYEES=0


AND E.SALARY=(SELECT(MAX(SALARY) FROM EMP_71));
SELECT D.DEP_NO ,D.DEP_NAME FROM DEPT_71 D,EMP_71 E WHERE D.NO_OF_EMPLOYEES=0 AND
E.SALARY=(SELECT(MAX(SALARY) FROM EMP_71))

*
ERROR at line 1:
ORA-00907: missing right parenthesis

SQL> SELECT D.DEP_NO ,D.DEP_NAME FROM DEPT_71 D,EMP_71 E WHERE E.DEP_NO=D.DEP_NO


AND D.NO_OF_EMPLOYEES=0 AND E.SALARY=(SELECT(MAX(SALARY) FROM EMP_71));
SELECT D.DEP_NO ,D.DEP_NAME FROM DEPT_71 D,EMP_71 E WHERE E.DEP_NO=D.DEP_NO AND
D.NO_OF_EMPLOYEES=0 AND E.SALARY=(SELECT(MAX(SALARY) FROM EMP_71))

*
ERROR at line 1:
ORA-00907: missing right parenthesis

SQL> SELECT D.DEP_NO ,D.DEP_NAME FROM DEPT_71 D,EMP_71 E WHERE E.DEP_NO=D.DEP_NO


AND D.NO_OF_EMPLOYEES=0 AND E.SALARY=(SELECT MAX(SALARY) FROM EMP_71);
no rows selected

SQL> SELECT * FROM EMP_71 LEFT [OUTER] JOIN DEPT_71 ON EMP_71.*=DEPT


2
SQL> SELECT * FROM EMP_71 LEFT [OUTER] JOIN DEPT_71 ON EMP_71.*=DEPT_71.*;
SELECT * FROM EMP_71 LEFT [OUTER] JOIN DEPT_71 ON EMP_71.*=DEPT_71.*
*
ERROR at line 1:
ORA-00933: SQL command not properly ended

SQL> SELECT * FROM EMP_71 LEFT [OUTER] JOIN DEPT_71 ON


EMP_71.DEP_NO=DEPT_71.DEP_NO;
SELECT * FROM EMP_71 LEFT [OUTER] JOIN DEPT_71 ON EMP_71.DEP_NO=DEPT_71.DEP_NO
*
ERROR at line 1:
ORA-00933: SQL command not properly ended

SQL> SELECT * FROM EMP_71 LEFT OUTER JOIN DEPT_71 ON EMP_71.DEP_NO=DEPT_71.DEP_NO;

EMP_NO DEP_NO DESIGNATION NAME MANAGER_SSN SALARY


---------- ---------- --------------- --------------- ----------- ----------
DEP_NO DEP_NAME MANAGER_NAME NO_OF_EMPLOYEES LOCATION
---------- --------------- --------------- --------------- --------------------
100 1 Prof Ross 100 1000
1 Ux Ted 10 Stafford

200 2 Tranfunds Chandler 500 2000


2 Ui Sheldon 20 Mabique

300 3 Prof Rachel 300 4000


3 Grpahics Bamey 23 Kingdo

EMP_NO DEP_NO DESIGNATION NAME MANAGER_SSN SALARY


---------- ---------- --------------- --------------- ----------- ----------
DEP_NO DEP_NAME MANAGER_NAME NO_OF_EMPLOYEES LOCATION
---------- --------------- --------------- --------------- --------------------
400 4 Theatre Joey 700 5000
4 Db Robin 50 Hositan

500 5 null null


5 Project mgt lily 60 Brington

600 6 Junior Assis Joel 800 10000


6 Profic Anne 73 Jacuqt

6 rows selected.

SQL> SELECT * FROM E.EMP_71 FROM EMP_71 E,DEPT_71 D WHERE D.NO_OF_EMPLOYEES=


(SELECT MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND D.LOCATION='Jacuqt';
SELECT * FROM E.EMP_71 FROM EMP_71 E,DEPT_71 D WHERE D.NO_OF_EMPLOYEES= (SELECT
MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND D.LOCATION='Jacuqt'
*
ERROR at line 1:
ORA-00933: SQL command not properly ended
SQL> SELECT * FROM E.EMP_71 FROM EMP_71 E,DEPT_71 D WHERE D.NO_OF_EMPLOYEES=
(SELECT MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND D.LOCATION=(SELECT LOCATION='Jacuqt'
from DEPT_71);
SELECT * FROM E.EMP_71 FROM EMP_71 E,DEPT_71 D WHERE D.NO_OF_EMPLOYEES= (SELECT
MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND D.LOCATION=(SELECT LOCATION='Jacuqt' from
DEPT_71)
*
ERROR at line 1:
ORA-00933: SQL command not properly ended

SQL> SELECT * FROM E.EMP_71 FROM EMP_71 E,DEPT_71 D WHERE D.NO_OF_EMPLOYEES= SELECT
MAX(NO_OF_EMPLOYEES) FROM DEPT_71 AND D.LOCATION=(SELECT LOCATION='Jacuqt' from
DEPT_71);
SELECT * FROM E.EMP_71 FROM EMP_71 E,DEPT_71 D WHERE D.NO_OF_EMPLOYEES= SELECT
MAX(NO_OF_EMPLOYEES) FROM DEPT_71 AND D.LOCATION=(SELECT LOCATION='Jacuqt' from
DEPT_71)
*
ERROR at line 1:
ORA-00933: SQL command not properly ended

SQL> SELECT * FROM E.EMP_71 FROM EMP_71 E,DEPT_71 D WHERE D.NO_OF_EMPLOYEES=


(SELECT MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND D.LOCATION=(SELECT LOCATION='Jacuqt'
from DEPT_71);
SELECT * FROM E.EMP_71 FROM EMP_71 E,DEPT_71 D WHERE D.NO_OF_EMPLOYEES= (SELECT
MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND D.LOCATION=(SELECT LOCATION='Jacuqt' from
DEPT_71)
*
ERROR at line 1:
ORA-00933: SQL command not properly ended

SQL> SELECT * FROM E.EMP_71 FROM EMP_71 E,DEPT_71 D WHERE D.NO_OF_EMPLOYEES=


(SELECT MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND D.LOCATION=(SELECT LOCATION='Jacuqt'
from DEPT_71) AND E.DEP_NO=D.DEP_NO;
SELECT * FROM E.EMP_71 FROM EMP_71 E,DEPT_71 D WHERE D.NO_OF_EMPLOYEES= (SELECT
MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND D.LOCATION=(SELECT LOCATION='Jacuqt' from
DEPT_71) AND E.DEP_NO=D.DEP_NO
*
ERROR at line 1:
ORA-00933: SQL command not properly ended

SQL> SELECT * FROM E.EMP_71 FROM EMP_71 E,DEPT_71 D WHERE D.DEP_NO=E.DEP_NO AND
D.NO_OF_EMPLOYEES= (SELECT MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND
D.LOCATION=(SELECT LOCATION='Jacuqt' from DEPT_71) ;
SELECT * FROM E.EMP_71 FROM EMP_71 E,DEPT_71 D WHERE D.DEP_NO=E.DEP_NO AND
D.NO_OF_EMPLOYEES= (SELECT MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND
D.LOCATION=(SELECT LOCATION='Jacuqt' from DEPT_71)
*
ERROR at line 1:
ORA-00933: SQL command not properly ended

SQL> SELECT * FROM E.EMP_71 FROM EMP_71 E,DEPT_71 D WHERE D.DEP_NO=E.DEP_NO AND
D.NO_OF_EMPLOYEES= (SELECT MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND
D.LOCATION=(SELECT LOCATION='Jacuqt' from DEPT_71) ;
SELECT * FROM E.EMP_71 FROM EMP_71 E,DEPT_71 D WHERE D.DEP_NO=E.DEP_NO AND
D.NO_OF_EMPLOYEES= (SELECT MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND
D.LOCATION=(SELECT LOCATION='Jacuqt' from DEPT_71)
*
ERROR at line 1:
ORA-00933: SQL command not properly ended

SQL> SELECT * FROM E.EMP_71 FROM EMP_71 E,DEPT_71 D WHERE D.DEP_NO=E.DEP_NO AND
D.NO_OF_EMPLOYEES= (SELECT MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND
D.LOCATION=(SELECT LOCATION='Jacuqt' from DEPT_71);
SELECT * FROM E.EMP_71 FROM EMP_71 E,DEPT_71 D WHERE D.DEP_NO=E.DEP_NO AND
D.NO_OF_EMPLOYEES= (SELECT MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND
D.LOCATION=(SELECT LOCATION='Jacuqt' from DEPT_71)
*
ERROR at line 1:
ORA-00933: SQL command not properly ended

SQL> SELECT * FROM E.EMP_71 FROM EMP_71 E,DEPT_71 D WHERE D.DEP_NO=E.DEP_NO AND
D.NO_OF_EMPLOYEES= (SELECT MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND
LOCATION='Jacuqt';
SELECT * FROM E.EMP_71 FROM EMP_71 E,DEPT_71 D WHERE D.DEP_NO=E.DEP_NO AND
D.NO_OF_EMPLOYEES= (SELECT MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND LOCATION='Jacuqt'
*
ERROR at line 1:
ORA-00933: SQL command not properly ended

SQL> SELECT * FROM E.EMP_71 FROM EMP_71 E,DEPT_71 D WHERE D.DEP_NO=E.DEP_NO AND
D.NO_OF_EMPLOYEES= (SELECT MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND
LOCATION='Jacuqt';
SELECT * FROM E.EMP_71 FROM EMP_71 E,DEPT_71 D WHERE D.DEP_NO=E.DEP_NO AND
D.NO_OF_EMPLOYEES= (SELECT MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND LOCATION='Jacuqt'
*
ERROR at line 1:
ORA-00933: SQL command not properly ended

SQL> SELECT * FROM E.EMP_71 FROM EMP_71 E,DEPT_71 D WHERE D.DEP_NO=E.DEP_NO AND
D.NO_OF_EMPLOYEES= (SELECT MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND
D.LOCATION='Jacuqt';
SELECT * FROM E.EMP_71 FROM EMP_71 E,DEPT_71 D WHERE D.DEP_NO=E.DEP_NO AND
D.NO_OF_EMPLOYEES= (SELECT MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND
D.LOCATION='Jacuqt'
*
ERROR at line 1:
ORA-00933: SQL command not properly ended

SQL> SELECT * FROM E.EMP_NO,E.DEP_NO,E.DESIGNATION,D.NAME,D.MANAGER_SSN,E.SALARY


FROM EMP_71,DEPT_71 D WHERE D.DEP_NO=E.DEP_NO AND D.NO_OF_EMPLOYEES= (SELECT
MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND D.LOCATION='Jacuqt';
SELECT * FROM E.EMP_NO,E.DEP_NO,E.DESIGNATION,D.NAME,D.MANAGER_SSN,E.SALARY FROM
EMP_71,DEPT_71 D WHERE D.DEP_NO=E.DEP_NO AND D.NO_OF_EMPLOYEES= (SELECT
MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND D.LOCATION='Jacuqt'
*
ERROR at line 1:
ORA-00933: SQL command not properly ended

SQL> SELECT E.EMP_NO,E.DEP_NO,E.DESIGNATION,D.NAME,D.MANAGER_SSN,E.SALARY FROM


EMP_71 E,DEPT_71 D WHERE D.DEP_NO=E.DEP_NO AND D.NO_OF_EMPLOYEES= (SELECT
MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND D.LOCATION='Jacuqt';
SELECT E.EMP_NO,E.DEP_NO,E.DESIGNATION,D.NAME,D.MANAGER_SSN,E.SALARY FROM EMP_71
E,DEPT_71 D WHERE D.DEP_NO=E.DEP_NO AND D.NO_OF_EMPLOYEES= (SELECT
MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND D.LOCATION='Jacuqt'
*
ERROR at line 1:
ORA-00904: "D"."MANAGER_SSN": invalid identifier

SQL> SELECT E.EMP_NO,E.DEP_NO,E.DESIGNATION,E.NAME,E.MANAGER_SSN,E.SALARY FROM


EMP_71 E,DEPT_71 D WHERE D.DEP_NO=E.DEP_NO AND D.NO_OF_EMPLOYEES= (SELECT
MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND D.LOCATION='Jacuqt';

EMP_NO DEP_NO DESIGNATION NAME MANAGER_SSN SALARY


---------- ---------- --------------- --------------- ----------- ----------
600 6 Junior Assis Joel 800 10000

SQL> SELECT E.EMP_NO FROM EMP_71 E,DEPT_71 D WHERE NO_OF_EMPLOYEES=(SELECT


MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND E.SALARY=(SELECT MAX(SALARY) FROM EMP_71);

EMP_NO
----------
600

SQL> SELECT E.EMP_NO,E.DEP_NO,E.DESIGNATION,E.NAME,E.SALARY FROM EMP_71 E,DEPT_71 D


WHERE NO_OF_EMPLOYEES=(SELECT MAX(NO_OF_EMPLOYEES) FROM DEPT_71) AND
E.SALARY=(SELECT MAX(SALARY) FROM EMP_71);

EMP_NO DEP_NO DESIGNATION NAME SALARY


---------- ---------- --------------- --------------- ----------
600 6 Junior Assis Joel 10000

SQL> SPOOL OFF