List output/message from the following queries/statements. (Use tables created in the Chapter 4 Lab Activity)

1. SELECT First || ‘ ‘ || Last “Name”, BirthDate FROM student;
2. SELECT DISTINCT (MajorId) FROM student;
3. SELECT * FROM location ORDER BY Building, Capacity DESC;
4. SELECT Lname, Fname, (Salary / 12) MONTHLYSALARY FROM employee
ORDER BY MONTHLYSALARY;
5. DELETE FROM faculty WHERE DeptId=2;


1.
SELECT First ||' ' || Last "Name", BirthDate FROM student;
Name BIRTHDATE
------------------------------- ---------
Jose Diaz 12-FEB-83
Mickey Tyler 18-MAR-84
Rajesh Patel 12-DEC-85
Deborah Rickles 20-OCT-70
Brian Lee 28-NOV-85
Amir Khan 07-JUL-84
6 rows selected.
2.
SQL> SELECT DISTINCT (MajorId) FROM student;
MAJORID
----------
100
200
400
500
3.
SQL> SELECT * FROM location ORDER BY Building, Capacity DESC;
ROOMID BUILDIN ROO CAPACITY R
---------- ------- --- ---------- -
11 Gandhi 101 2 O
12 Gandhi 103 2 O
17 Gandhi 105 2 O
21 Gandhi 109 2 O
20 Gandhi 107 2 O
14 Kennedy 204 50 L
18 Kennedy 206 40 L
13 Kennedy 202 35 L
19 Kennedy 210 30 L
15 Nehru 301 50 C
16 Nehru 309 45 C
11 rows selected.
4.
SQL> SELECT Lname, Fname, (Salary / 12) MONTHLYSALARY FROM
2 employee ORDER BY MONTHLYSALARY;
LNAME FNAME MONTHLYSALARY
------------------------------ --------------- -------------
Shaw Jinku 2041.66667
Chen Sunny 2916.66667
Garner Stanley 3750
McCall Alex 5541.66667
Roberts Sandi 6250
Dev Derek 6666.66667
Houston Larry 12500
Smith John 22083.3333
8 rows selected.
5.
SQL> DELETE FROM faculty WHERE DeptId=2;
DELETE FROM faculty WHERE DeptId=2
*
ERROR at line 1:
ORA-02292: integrity constraint (SYSTEM.STUDENT_FACULTYID_FK)
violated – child record found

Computer Science & Information Technology

You might also like to view...

In 3D terminology, an object's ____ is how much it has rotated about its UP-DOWN axis from its original position.

A. yaw B. spin C. reorientation D. skew

Computer Science & Information Technology

The following compilers exist on our LINUX system: cc, gcc, g++, and f77. These compilers were located in the /usr/bin and not in the /bin directory. We used the following command to locate the cc compiler and similar commands to locate other compilers. If a command does not display anything for a given compiler name, it means that that compiler doesn’t exist.

What will be an ideal response?

Computer Science & Information Technology

By default, PowerPoint ends a slide show with a black slide.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

To find every occurrence of a specific word or phrase in a document, click in the ____ Document box in the Navigation Pane, and then type the word or phrase.

A. Find B. Replace C. Scan D. Search

Computer Science & Information Technology