questions. Write the SQL code to enter the rows shown in the following Figure inside the table EMP_1. EMP NTIAL EMP NUM EMP LNAME EMP FNAME EMP HIREDATE JOB_CODE 08-Nov-00 502 12-Jul-89 501 101 News John 102 103 Senior David Arbough June 01-Dec-96 500 104 Ramoras Anne 15-Nov-87 501 105 106 107 Johnson Alice 01-Feb-93 502 Smithfield William 22-Jun-04 500 10-Oct-93 500 Alonzo Maria 108 Washington Ralph Larry B 22-Aug-91 501 109 Smith 18-Jul-97 501 OHEKK

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
a SELECT DISTINCT on the results set.
IIL
Activities
1) In this activity, refer to the Construct Company schema studied in activity one of lab 3.
a) Load the ConstructCompany Schema.sql script and execute it to create all the tables of the
schema. Use this database to answer the following questions.
b) Write the SQL code to enter the rows shown in the following Figure inside the table EMP 1.
EMP_NUM EMP LNAME
News
Senior
Arbough
Ramoras
Johnson
Smithfield
101
102
EMP FNAME EMPNTIAL EMP HIREDATE JOB CODE
John
David
G
08-Nov-00 502
H
12-Jul-89 501
103
104
105
June
01-Dec-96 500
Anne
K
15-Nov-87 501
01-Feb-93 502
22-Jun-04 500
Alice
K
106
107
108
109
William
Alonzo
Maria
D
10-Oct-93 500
Washington Ralph
22-Aug-91 501
Smith
Lerry
18-Jul-97 501
c) Write the SQL code that will list all attributes for a job code of 502.
d) Write the SQL code that will save the changes made to the EMP_1 table.
e) Write the SQL code to change the job code to 501 for the person whose employee number
(EMP_NUM) is 107. After you have completed the task, examine the results, and then reset
the job code to its original value.
f) Write the SQL code to delete the row for the person
on June 22, 2004, and whose job code classification is 500
William Smithfield, who was hired
g) Write the SQL code required to list all employees whose last names start with Smith.
ndows bulw
alacl Jhil
h) Using the EMPLOYEE, JOB, and PROJECT tables in ConstructCompany Schema, write the
SQL code that will produce the result shown in the following Figure.
(Soi iall
TOSHIBA
F6
F7
F8
BVD
F10
F11
F12
INS
SCROLL LOCK
6.
&
7.
V.
8.
- BA
T.
P.
1.
HiJ
1.
%3D
Transcribed Image Text:a SELECT DISTINCT on the results set. IIL Activities 1) In this activity, refer to the Construct Company schema studied in activity one of lab 3. a) Load the ConstructCompany Schema.sql script and execute it to create all the tables of the schema. Use this database to answer the following questions. b) Write the SQL code to enter the rows shown in the following Figure inside the table EMP 1. EMP_NUM EMP LNAME News Senior Arbough Ramoras Johnson Smithfield 101 102 EMP FNAME EMPNTIAL EMP HIREDATE JOB CODE John David G 08-Nov-00 502 H 12-Jul-89 501 103 104 105 June 01-Dec-96 500 Anne K 15-Nov-87 501 01-Feb-93 502 22-Jun-04 500 Alice K 106 107 108 109 William Alonzo Maria D 10-Oct-93 500 Washington Ralph 22-Aug-91 501 Smith Lerry 18-Jul-97 501 c) Write the SQL code that will list all attributes for a job code of 502. d) Write the SQL code that will save the changes made to the EMP_1 table. e) Write the SQL code to change the job code to 501 for the person whose employee number (EMP_NUM) is 107. After you have completed the task, examine the results, and then reset the job code to its original value. f) Write the SQL code to delete the row for the person on June 22, 2004, and whose job code classification is 500 William Smithfield, who was hired g) Write the SQL code required to list all employees whose last names start with Smith. ndows bulw alacl Jhil h) Using the EMPLOYEE, JOB, and PROJECT tables in ConstructCompany Schema, write the SQL code that will produce the result shown in the following Figure. (Soi iall TOSHIBA F6 F7 F8 BVD F10 F11 F12 INS SCROLL LOCK 6. & 7. V. 8. - BA T. P. 1. HiJ 1. %3D
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education