0% found this document useful (0 votes)
5 views

SQL Assignment

sql commands that will help students in IT fileds

Uploaded by

Dennis Mutuku
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

SQL Assignment

sql commands that will help students in IT fileds

Uploaded by

Dennis Mutuku
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

SQL> Create user Assignment

2 Identified by M2CLB;

SQL> Grant create session to Assignment;

SQL> Grant dba to Assignment;

SQL> connect Assignment/M2CLB;

SQL> select * from tab;

TNAME TABTYPE CLUSTERID

------------------------------ ------- ----------

COURSE TABLE

CUSTOMER TABLE

DEPARTMENT TABLE

DRIVER TABLE

ENROLLMENT TABLE

EXAM TABLE

GRADUATION TABLE

LIBRARY TABLE

PARCEL TABLE

ROUTE TABLE

SCHOOL_STAFF TABLE

TNAME TABTYPE CLUSTERID

------------------------------ ------- ----------

SHIPMENT TABLE

STUDENT_FEES TABLE

STUDENT_RECORDS TABLE

VEHICLE TABLE
15 rows selected.

SQL> select count(*) from Course;

COUNT(*)

----------

21

SQL> select count(*) from Customer;

COUNT(*)

----------

21

SQL> select count(*) from Department;

COUNT(*)

----------

21

SQL> select count(*) from Driver;

COUNT(*)

----------

21

SQL> select count(*) from Enrollment;

COUNT(*)

----------

21
SQL> select count(*) from Exam;

COUNT(*)

----------

21

SQL> select count(*) from Graduation;

COUNT(*)

----------

21

SQL> select count(*) from Library;

COUNT(*)

----------

21

SQL> select count(*) from Parcel;

COUNT(*)

----------

21

SQL> select count(*) from Route;

COUNT(*)

----------

21

SQL> select count(*) from School_Staff;

COUNT(*)

----------
21

SQL> select count(*) from Shipment;

COUNT(*)

----------

21

SQL> select count(*) from Student_fees;

COUNT(*)

----------

21

SQL> select count(*) from Student_records;

COUNT(*)

----------

21

SQL> select count(*) from Vehicle;

COUNT(*)

----------

21

SQL> spool off;

You might also like