INF3707-24-Y Welcome Message Assessment 2
QUIZ
Started on Sunday, 19 May 2024, 8:30 AM
State Finished
Completed on Tuesday, 21 May 2024, 7:20 PM
Time taken 2 days 10 hours
Marks 45.00/51.00
Grade 88.24 out of 100.00
Question 1
Correct
Mark 1.00 out of 1.00
Name Null? Type
--------- ----- ------------
GIFT VARCHAR2(15)
MINRETAIL NUMBER(5,2)
MAXRETAIL NUMBER(5,2)
Based on the structure of the PROMOTION table, which of the following
commands will add a PRIMARY KEY constraint to the GIFT column?
1. CREATE constraint promo_pk (gift VARCHAR2(15) PRIMARY KEY;
2.
ALTER TABLE promotion MODIFY constraint promo_pk (gift PRIMARY
KEY);
3. ALTER TABLE promotion SET constraint promo_pk PRIMARY KEY gift;
4.
ALTER TABLE promotion ADD constraint promo_pk PRIMARY
KEY(gift);
Your answer is correct.
The correct answer is:
ALTER TABLE promotion ADD constraint promo_pk PRIMARY KEY(gift);
,Question 2
Incorrect
Mark 0.00 out of 1.00
If a column alias contains a blank space, it must be enclosed in __________.
1. Single quotation marks (' ').
2. Asterisks (* *).
3. Percent signs (% %).
4. Double quotation marks (" ").
Your answer is incorrect.
If a column has an alias that has spaces between the words, it should be
enclosed in a double quotation marks (" ").
The correct answer is:
Double quotation marks (" ").
Question 3
Correct
Mark 1.00 out of 1.00
Which of the following can't be modified with the ALTER SEQUENCE command?
1. INCREMENT BY
2. START WITH
3. MINVALUE
4. MAXVALUE
Your answer is correct.
The correct answer is:
START WITH
, Question 4
Correct
Mark 1.00 out of 1.00
Which of the following commands will increase the size of the CITY column in
the CUSTOMERS table from 12 to 20 and increase the size of the LASTNAME
column from 10 to 14?
1. ALTER TABLE customers
MODIFY (city VARCHAR2(+8), lastname VARCHAR2(+4));
2. ALTER TABLE customers
MODIFY (city VARCHAR2(20), lastname VARCHAR2(14));
3. ALTER TABLE customers
MODIFY (city (+8), lastname (+4));
4. ALTER TABLE customers
MODIFY (city (20), lastname (14));
Your answer is correct.
ALTER TABLE customers
MODIFY (city VARCHAR2(20), lastname VARCHAR2(14));
The correct answer is:
ALTER TABLE customers
MODIFY (city VARCHAR2(20), lastname VARCHAR2(14));
Question 5
Correct
Mark 1.00 out of 1.00
Which of the following keywords cannot be used to modify an existing table?
1. ALTER TABLE ......ADD
2. ALTER TABLE.......DROP COLUMN
3. ALTER TABLE ........MODIFY
4. ALTER TABLE ........ AS
Your answer is correct.
The correct answer is:
ALTER TABLE ........ AS
QUIZ
Started on Sunday, 19 May 2024, 8:30 AM
State Finished
Completed on Tuesday, 21 May 2024, 7:20 PM
Time taken 2 days 10 hours
Marks 45.00/51.00
Grade 88.24 out of 100.00
Question 1
Correct
Mark 1.00 out of 1.00
Name Null? Type
--------- ----- ------------
GIFT VARCHAR2(15)
MINRETAIL NUMBER(5,2)
MAXRETAIL NUMBER(5,2)
Based on the structure of the PROMOTION table, which of the following
commands will add a PRIMARY KEY constraint to the GIFT column?
1. CREATE constraint promo_pk (gift VARCHAR2(15) PRIMARY KEY;
2.
ALTER TABLE promotion MODIFY constraint promo_pk (gift PRIMARY
KEY);
3. ALTER TABLE promotion SET constraint promo_pk PRIMARY KEY gift;
4.
ALTER TABLE promotion ADD constraint promo_pk PRIMARY
KEY(gift);
Your answer is correct.
The correct answer is:
ALTER TABLE promotion ADD constraint promo_pk PRIMARY KEY(gift);
,Question 2
Incorrect
Mark 0.00 out of 1.00
If a column alias contains a blank space, it must be enclosed in __________.
1. Single quotation marks (' ').
2. Asterisks (* *).
3. Percent signs (% %).
4. Double quotation marks (" ").
Your answer is incorrect.
If a column has an alias that has spaces between the words, it should be
enclosed in a double quotation marks (" ").
The correct answer is:
Double quotation marks (" ").
Question 3
Correct
Mark 1.00 out of 1.00
Which of the following can't be modified with the ALTER SEQUENCE command?
1. INCREMENT BY
2. START WITH
3. MINVALUE
4. MAXVALUE
Your answer is correct.
The correct answer is:
START WITH
, Question 4
Correct
Mark 1.00 out of 1.00
Which of the following commands will increase the size of the CITY column in
the CUSTOMERS table from 12 to 20 and increase the size of the LASTNAME
column from 10 to 14?
1. ALTER TABLE customers
MODIFY (city VARCHAR2(+8), lastname VARCHAR2(+4));
2. ALTER TABLE customers
MODIFY (city VARCHAR2(20), lastname VARCHAR2(14));
3. ALTER TABLE customers
MODIFY (city (+8), lastname (+4));
4. ALTER TABLE customers
MODIFY (city (20), lastname (14));
Your answer is correct.
ALTER TABLE customers
MODIFY (city VARCHAR2(20), lastname VARCHAR2(14));
The correct answer is:
ALTER TABLE customers
MODIFY (city VARCHAR2(20), lastname VARCHAR2(14));
Question 5
Correct
Mark 1.00 out of 1.00
Which of the following keywords cannot be used to modify an existing table?
1. ALTER TABLE ......ADD
2. ALTER TABLE.......DROP COLUMN
3. ALTER TABLE ........MODIFY
4. ALTER TABLE ........ AS
Your answer is correct.
The correct answer is:
ALTER TABLE ........ AS