Instructions:: - Work On This Lab Individually. Discussion Is Not Allowed. - Evaluation Will Be Conducted Within Lab
Instructions:: - Work On This Lab Individually. Discussion Is Not Allowed. - Evaluation Will Be Conducted Within Lab
Instructions:: - Work On This Lab Individually. Discussion Is Not Allowed. - Evaluation Will Be Conducted Within Lab
Instructions:
• Work on this lab individually. Discussion is not allowed.
• Evaluation will be conducted within lab
• Anyone caught being indulged in the act of plagiarism would
be awarded F grade in this lab.
1. Open the following URL in any Browser to access the Oracle Database Server.
http://databasesrv/isqlplus
2. Initiate a SQL*Plus session using the user ID and password provided by the instructor
3. Open and Select the SampleDB.sql database file to load sample database and test database file.
4. Test and explore database file by Executing the SELECT statement.
SQL> SELECT *
2 FROM emp;
9. Create a query to display the name, job, hire date, and employee number for each employee. with
employee number appearing first.
11. Name the column headings Emp#, Employee, Job, and Hire Date. respectively. Rerun your query
Emp # Employee Job HIRE DATE
--------------------------------------------------------------------------
7839 KING PRESIDENT 17-NOV-81
7698 BLAKE MANAGER 01-MAY-81
7782 CLARK MANAGER 09-JUN-81
7566 JONES MANAGER 02-APR-81
7654 MARTIN SALESMAN 28-SEP-81
12. Display the name concatenated with the job. Separated by a comma and space, and name the
column Employee and Title.
Employee and Title
-------------------------
KING, PRESIDENT
BLAKE, MANAGER
CLARK, MANAGER
JONES, MANAGER
MARTIN, SALESMAN
ALLEN, SALESMAN
TURNER, SALESMAN
13. Create a query to display all the data from the EMP table. Separate each column by a comma.
Name the column THE_OUTPUT.
THE_OUTPUT
-------------------------------------------------------------------
7839, KING, PRESIDENT, 17-NOV-81, 5000, 10
7698, BLAKE, MANAGER, 7839, 01-MAY-81, 2850, 30
7782, CLARK, MANAGER, 7839, 09-JUN-81, 2450, 10
7566, JONES, MANAGER, 7839, 02-APR-81, 2975, 20
Good Luck