Which SQL statement defines the FOREIGN KEY constraint on the DEPTNO column of the EMP table? EMPLOYEES EMPLOYEE ID EMP NAME DEPT ID MGR ID JOB ID SALARY 4000 2500 101 Smith 20 SA REP 120 105 120 102 Martin 10 CLERK 103 Chris John Diana Smith 20 ADMIN HR CLERK 2500 IT ADMIN IT 4200 104 105 106 30 108 30 108 5000 40 110 AD ASST 3000 108 110 120 Jennifer Bob 30 HR DIR EX DIR SA DIR 110 6500 40 SO00 Ravi 20 110 6500 DEPARTMENTS DEPARTMENT ID DEPARTMENT NAME 10 20 30 40 Admin Education IT Human Resources

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
Which one is correct
Which SQL statement defines the FOREIGN KEY constraint on the DEPTNO column of the EMP table?
EMPLOYEES
EMPLOYEE ID EMP NAME DEPT ID MGR ID JOB ID
SALARY
4000
S00
101
Smith
20
SA REP
CLERK
120
102
Martin
Chris
John
Diana
Smith
Jennifer
Bob
Ravi
10
105
103
104
20
120
ADMIN
4200
30
105
106
108
1O8
110
HR CLERK 2500
IT ADMIN
AD ASST
30
SO00
FO00
40
108
110
120
30
40
20
110
HR DIR
6500
110
SA DIR
6500
DEPARTMENTS
DEPARTMENT ID DEPARTMENT NAE
10
20
30
40
Admin
Education
IT
Human Resources
CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno
O NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk FOREIGN KEY deptno
REFERENCES dept deptno);
CRETE TABLE EM (empno NUMBER(4), ename VARCHAR2(35) deptno NUMBER (7,2)
O NOT NULL, CONSTRAINT em_deptno_fk REFERENCES dept (deptno) FOREIGN KEY
(deptno));
CREATE TABLE EMP (empno NUMBER (4), ename VARCHAR2(35), deptno
ONUMBER(7,2) FOREIGN KEY CONSTRAINT emp deptno fk REFERENCES dept
(deptno));
CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno
NUMBER(7,2) CONSTRAINT emp_deptno_fk FOREIGN KEY(deptno)REFERENCES dept
(deptno);
None of above
Transcribed Image Text:Which one is correct Which SQL statement defines the FOREIGN KEY constraint on the DEPTNO column of the EMP table? EMPLOYEES EMPLOYEE ID EMP NAME DEPT ID MGR ID JOB ID SALARY 4000 S00 101 Smith 20 SA REP CLERK 120 102 Martin Chris John Diana Smith Jennifer Bob Ravi 10 105 103 104 20 120 ADMIN 4200 30 105 106 108 1O8 110 HR CLERK 2500 IT ADMIN AD ASST 30 SO00 FO00 40 108 110 120 30 40 20 110 HR DIR 6500 110 SA DIR 6500 DEPARTMENTS DEPARTMENT ID DEPARTMENT NAE 10 20 30 40 Admin Education IT Human Resources CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno O NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk FOREIGN KEY deptno REFERENCES dept deptno); CRETE TABLE EM (empno NUMBER(4), ename VARCHAR2(35) deptno NUMBER (7,2) O NOT NULL, CONSTRAINT em_deptno_fk REFERENCES dept (deptno) FOREIGN KEY (deptno)); CREATE TABLE EMP (empno NUMBER (4), ename VARCHAR2(35), deptno ONUMBER(7,2) FOREIGN KEY CONSTRAINT emp deptno fk REFERENCES dept (deptno)); CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) CONSTRAINT emp_deptno_fk FOREIGN KEY(deptno)REFERENCES dept (deptno); None of above
Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Multiple 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
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