Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
7Activity
0 of .
Results for:
No results containing your search query
P. 1
SQL Fundamentals - Practice C

SQL Fundamentals - Practice C

Ratings: (0)|Views: 263 |Likes:
Published by Abby AR

More info:

Published by: Abby AR on Mar 21, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

08/07/2010

pdf

text

original

 
Oracle Database 10
: SQL Fundamentals I C -23
Practice C
1.Write a query for the HR department to produce the addresses ofall the departments. Usethe
LOCATIONS
and
COUNTRIES
tables. Show the location ID, street address, city, stateor province, and country in the output.2.The HR department needs a report of all employees. Write a queryto display the last name,department number, and department name for all employees.
 
Oracle Database 10
: SQL Fundamentals I C -24
Practice C (continued)
3.The HR department needs a report of employees in Toronto. Display the last name, job,department number, and department name for all employees who work in Toronto.4.Create a report to display the employee last name and employee number along with theemployee’s manager’s last name and manager number. Label the columns
Employee
,
Emp#
,
Manager
, and
Mgr#
, respectively. Place your SQL statement in a text file named
lab_c_04.sql
.
 
Oracle Database 10
: SQL Fundamentals I C -25
Practice C (continued)
5.Modify
lab_c_04.sql
to display all employees including King, who has no manager.Order the results by the employee number. Place your SQL statement in a text file named
lab_c_05.sql
. Run the query in
lab_c_05.sql
.6.Create a report for the HR department that displays employee last names, departmentnumbers, and all the employees who work in the same department as a given employee.Give each column an appropriate label. Save the script to a filenamed
lab_c_06.sql
.

Activity (7)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
Jojo Cansino liked this
bhkrmv liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->