INF3707 Assignment No.4 Questions
1.Based on the contents of the PUBLISHER table, which of the following will add a
new record to the table?
PUBID NAME CONTACT
PHONE
1 PRINTING IS US 1 TOMMIE SEYMOUR
000-714-8321
2 PUBLISH OUR WAY 2 JANE TOMLIN
010-410-0010
3 AMERICAN PUBLISHING 3 DAVID DAVIDSON
800-555-1211
4 READING MATERIALS INC 4 RENEE SMITH
800-555-9743
5 REED-N-RITE 5 SEBASTIAN JONES
800-555-8284
a. UPDATE publisher VALUES ('BOOKS MADE CHEAP', '800-111-2222');
b. UPDATE publisher (pubid, name)VALUES (6, 'BOOKS MADE CHEAP');
Commented [DE1]:
c. INSERT INTO publisher (pubid, name) VALUES (6, 'BOOKS MADE CHEAP');
d. INSERT INTO publisher VALUES ('BOOKS MADE CHEAP', '800-111-2222');
2.Which one of the following commands is used to add data to an existing row in a
table?
a. MODIFY
b. ADD
c. INSERT
d. UPDATE
3.Based on the structure of the ORDERITEMS table and the BOOK table:
SQL> desc orderitems
Name Null? Type
------- ------ ----------
ORDER# NOT NULL NUMBER(4)
ITEM# NOT NULL NUMBER(2)
ISBN VARCHAR2(10)
QUANTITY NOT NULL NUMBER(3)
PAIDEACH NOT NULL NUMBER(5,2)
1.Based on the contents of the PUBLISHER table, which of the following will add a
new record to the table?
PUBID NAME CONTACT
PHONE
1 PRINTING IS US 1 TOMMIE SEYMOUR
000-714-8321
2 PUBLISH OUR WAY 2 JANE TOMLIN
010-410-0010
3 AMERICAN PUBLISHING 3 DAVID DAVIDSON
800-555-1211
4 READING MATERIALS INC 4 RENEE SMITH
800-555-9743
5 REED-N-RITE 5 SEBASTIAN JONES
800-555-8284
a. UPDATE publisher VALUES ('BOOKS MADE CHEAP', '800-111-2222');
b. UPDATE publisher (pubid, name)VALUES (6, 'BOOKS MADE CHEAP');
Commented [DE1]:
c. INSERT INTO publisher (pubid, name) VALUES (6, 'BOOKS MADE CHEAP');
d. INSERT INTO publisher VALUES ('BOOKS MADE CHEAP', '800-111-2222');
2.Which one of the following commands is used to add data to an existing row in a
table?
a. MODIFY
b. ADD
c. INSERT
d. UPDATE
3.Based on the structure of the ORDERITEMS table and the BOOK table:
SQL> desc orderitems
Name Null? Type
------- ------ ----------
ORDER# NOT NULL NUMBER(4)
ITEM# NOT NULL NUMBER(2)
ISBN VARCHAR2(10)
QUANTITY NOT NULL NUMBER(3)
PAIDEACH NOT NULL NUMBER(5,2)