SQL Plus Oracle Database 21c Express Edition Release 21.0.0.0.0 Version 21.3.0.0.0 SQL> CREATE TABLE dept ( 2 did INT, 3 dname VARCHAR(30), 4 PRIMARY KEY (did) 5 ) ; Production Table created. SQL> SQL> CREATE TABLE emp ( 23456789 9 ) ; eid INT, ename VARCHAR(30), did INT, hiredate DATE, salary NUMBER, PRIMARY KEY (eid), FOREIGN KEY (did) REFERENCES dept (did) Table created. SQL> INSERT INTO dept VALUES (1, 'IT'); 1 row created. SQL> INSERT INTO dept VALUES (2, 'HR'); 1 row created. SQL> SQL> INSERT INTO emp VALUES (1, 'jeff', 1, DATE '2005-01-01', 70000); 1 row created. SQL> INSERT INTO emp VALUES (2, 'susan', 2, DATE '2005-06-01', 50000); 1 row created. SQL> INSERT INTO emp VALUES (3, 'bob', 1, DATE '2000-01-01', 90000); 1 row created. SQL> INSERT INTO emp VALUES (4, 'steve', 1, DATE '2006-01-01', 60000);

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
100%
SQL Plus
Oracle Database 21c Express Edition Release 21.0.0.0.0
Version 21.3.0.0.0
SQL> CREATE TABLE dept (
2
did INT,
3
dname VARCHAR(30),
4
PRIMARY KEY (did)
5 ) ;
Production
Table created.
SQL>
SQL> CREATE TABLE emp (
23456789
9 ) ;
eid INT,
ename VARCHAR(30),
did INT,
hiredate DATE,
salary NUMBER,
PRIMARY KEY (eid),
FOREIGN KEY (did) REFERENCES dept (did)
Table created.
SQL> INSERT INTO dept VALUES (1, 'IT');
1 row created.
SQL> INSERT INTO dept VALUES (2, 'HR');
1 row created.
SQL>
SQL> INSERT INTO emp VALUES (1, 'jeff', 1, DATE '2005-01-01', 70000);
1 row created.
SQL> INSERT INTO emp VALUES (2, 'susan', 2, DATE '2005-06-01', 50000);
1 row created.
SQL> INSERT INTO emp VALUES (3, 'bob', 1, DATE '2000-01-01', 90000);
1 row created.
SQL> INSERT INTO emp VALUES (4, 'steve', 1, DATE '2006-01-01', 60000);
Transcribed Image Text:SQL Plus Oracle Database 21c Express Edition Release 21.0.0.0.0 Version 21.3.0.0.0 SQL> CREATE TABLE dept ( 2 did INT, 3 dname VARCHAR(30), 4 PRIMARY KEY (did) 5 ) ; Production Table created. SQL> SQL> CREATE TABLE emp ( 23456789 9 ) ; eid INT, ename VARCHAR(30), did INT, hiredate DATE, salary NUMBER, PRIMARY KEY (eid), FOREIGN KEY (did) REFERENCES dept (did) Table created. SQL> INSERT INTO dept VALUES (1, 'IT'); 1 row created. SQL> INSERT INTO dept VALUES (2, 'HR'); 1 row created. SQL> SQL> INSERT INTO emp VALUES (1, 'jeff', 1, DATE '2005-01-01', 70000); 1 row created. SQL> INSERT INTO emp VALUES (2, 'susan', 2, DATE '2005-06-01', 50000); 1 row created. SQL> INSERT INTO emp VALUES (3, 'bob', 1, DATE '2000-01-01', 90000); 1 row created. SQL> INSERT INTO emp VALUES (4, 'steve', 1, DATE '2006-01-01', 60000);
Expert Solution
steps

Step by step

Solved in 1 steps

Blurred answer
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