0% found this document useful (0 votes)
55 views2 pages

CSC239 Fall 2023 Section 60 Oracle Lab Test 1

Uploaded by

Sarthi Shah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views2 pages

CSC239 Fall 2023 Section 60 Oracle Lab Test 1

Uploaded by

Sarthi Shah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Middlesex County College

CSC239-60 Business & Computer Science Department Version 5


Oracle Test #1 Database Concepts Page 1
__________________________________________________________________________________________

Lab Test #1

A. Activity:
1. Open a new Word document.
2. At the top line of the Word document, type out:
your full name, CSC239-xx (xx is your section number), LabTest#1
3. Save this Word document with the name of LabTest#1 in your flash drive’s CSC239 folder
named
CSC239LabAssignments.
4. Using a web browser, go to the website: academy.oracle.com
5. Select the “Sign In / Register” option.
6. Select the Application Express option to log in.
7. Log into Application Express.
8. Use sql statement and create tables or create using object browser-EMP and DEPT
a. Make empno as the primary key to the table
b. To ensure that the ename column does not contain NULL values
c. The job column to have only UPPERCASE entries
d. To put current date as the default date in hiredate column in case data is not supplied for the
column
9. Insert data using sql statements/object browser (data as listed below) for DEPT and EMP tables

DEPT Table
DEPTNO DNAME LOC
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON

EMP Table
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-1980 800 20
7499 ALLEN SALESMAN 7698 20-FEB-1981 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-1981 1250 500 30
7566 JONES MANAGER 7839 02-APR-1981 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-1981 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-1981 2850 30
7782 CLARK MANAGER 7839 09-JUN-1981 2450 10
7788 SCOTT ANALYST 7566 06-JUN-1993 3000 20
7839 KING PRESIDENT 17-NOV-1981 5000 10
7844 TURNER SALESMAN 7698 08-SEP-1981 1500 0 30
7876 ADAMS CLERK 7788 10-JUL-1993 1100 20
7900 JAMES CLERK 7698 03-DEC-1981 950 30
7902 FORD ANALYST 7566 03-DEC-1981 3000 20
7934 MILLER CLERK 7782 23-JAN-1982 1300 10
Middlesex County College
CSC239-60 Business & Computer Science Department Version 5
Oracle Test #1 Database Concepts Page 2
__________________________________________________________________________________________

10. Show the structure of tables EMP and DEPT.


11. Select all data from EMP table.
12. Select all data from DEPT table.
13. Select only employee number and hiredate from EMP table.
14. Select only employee number and hiredate from EMP table for employees whose hiredate is
greater than ’01-JAN-1982’.
15. Select all data from EMP table and display by names in ascending order.
16. Delete data for employee ‘SCOTT’.
17. Update employee name to ‘ADAM’ from ‘ADAMS’.
18. Select Department name and location from DEPT table. Change the heading from LOC to
LOCATION.
19. List all employees working in department number 10 from EMP table.
20. List all employees working in department 10 or 20.
21 List employees hired after 01/09/81 and working in department number 10.
22 List employees working in departments other than 10.
23 List employees whose name begins with ‘J’.
24 List all employees hired during the year ’82.
25 Find the average salary of all employees.

You might also like