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

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter11: Group Functions
Section: Chapter Questions
Problem 18MC
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.
Recommended textbooks for you
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage