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);

Fundamentals of Information Systems
8th Edition
ISBN:9781305082168
Author:Ralph Stair, George Reynolds
Publisher:Ralph Stair, George Reynolds
Chapter3: Database Systems And Applications
Section: Chapter Questions
Problem 9SAT: _______________ is a special purpose programming language for accessing and manipulating data stored...
icon
Related questions
Question
100%

The course I'm taking is database management. 

I have attached the necessary information for this question. I need help with part A ,B and C please. I am using APEX Oracle compiler.

 

Part A - 4) Using for loop find the sum of first 10 natural numbers.

Part B - Using basic loop insert value into the dept table.

Part C - Declare a variable d_name which is of dname column type of dept table, and give it a value 'service', print the variable on screen.

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
  • SEE MORE QUESTIONS
Recommended textbooks for you
Fundamentals of Information Systems
Fundamentals of Information Systems
Computer Science
ISBN:
9781305082168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
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
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
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
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