
Fundamentals of Information Systems
8th Edition
ISBN: 9781305082168
Author: Ralph Stair, George Reynolds
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Question
thumb_up100%
The course I'm taking is
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.

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

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 1 steps

Knowledge Booster
Similar questions
- Attempt to view the structure of the HOMEWORK13 view.arrow_forwardDelete the index named ITEM_INDEX3.arrow_forwardThe following tables provide a very small portion of the data that will be kept in the database. These data need to be inserted into the database for testing purposes. Write the INSERT commands necessary to place the following data in the tables that were created in Problem 65. RENTAL RENT_NUM RENT_DATE MEM_NUM 1001 01-MAR-13 103 1002 01-MAR-13 105 1003 02-MAR-13 102 1004 02-MAR-13 110 1005 02-MAR-13 111 1006 02-MAR-13 107 1007 02-MAR-13 104 1008 03-MAR-13 105 1009 03-MAR-13 111 VIDEO VID_NUM VID_INDATE MOVIE_NUM 54321 18-JUN-12 1234 54324 18-JUN-12 1234 54325 18-JUN-12 1234 34341 22-JAN-11 1235 34342 22-JAN-11 1235 34366 02-MAR-13 1236 34367 02-MAR-13 1236 34368 02-MAR-13 1236 34369 02-MAR-13 1236 44392 21-OCT-12 1237 44397 21-OCT-12 1237 59237 14-FEB-13 1237 61388 25-JAN-11 1239 61353 28-JAN-10 1245 61354 28-JAN-10 1245 61367 30-JUL-12 1246 61369 30-JUL-12 1246arrow_forward
- What happens to the existing rows of a table if the DEFAULT value of a column is changed?arrow_forwardWhat happens if you try to decrease the scale or precision of a NUMBER column to a value less than the data already stored in the field?arrow_forwardAccess path A database table is composed of records and fields hold data. Data is stored in records. A field is a part of a record and contains a single piece of data for the subject of the record. The access path for finding the list of books is AUTHOR: AuthorID, Lname BOOKAUTHOR: AuthorID, ISBN BOOKS: Pubdate, ISBNarrow_forward
- Write the two SQL command sequences required to: a.Create a temporary table named TEMP_1 whose structure is composed of the EMP_2 attributes EMP_NUM and EMP_PCT. b.Copy the matching EMP_2 values into the TEMP_1 table.arrow_forwardA(n) _____ is a request for specific information from a database.arrow_forwardWhat is a NULL value?arrow_forward
- Which of the following data dictionary objects should be used to view information about the constraints in a database? USER_TABLES USER_RULES USER_COLUMNS USER_CONSTRAINTS None of the above objects should be used.arrow_forwardWrite the SQL code to calculate the ASSIGN_CHARGE values in the ASSIGNMENT table in the Ch07_ConstructCo database. (See Figure P7.1.) Note that ASSIGN_CHARGE is a derived attribute that is calculated by multiplying ASSIGN_CHG_HR by ASSIGN_HOURS.arrow_forwardAn in-memory database (IMDB) is a database management system that stores the entire database in _______. a. random access memory b. read-only memory c. distributed servers d. virtual memoryarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Fundamentals of Information SystemsComputer ScienceISBN:9781305082168Author:Ralph Stair, George ReynoldsPublisher:Cengage LearningA Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology Ptr
- Systems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage LearningDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781305627482Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781285196145Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos CoronelPublisher:Cengage Learning

Fundamentals of Information Systems
Computer Science
ISBN:9781305082168
Author:Ralph Stair, George Reynolds
Publisher:Cengage Learning


A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr

Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

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