Which statement correctly adds the values 'Strawberry' and 'Red' for the type and color col-
umns, respectively, in the 'fruits' table?
A. INSERT INTO fruits (type, color) VALUES ('Strawberry', 'Red');
B. INSERT INTO fruits (type, color) VALUES ('Strawberry', 'Red', 'Seedless');
C. INSERT INTO fruits (type, color) VALUES ('Red', 'Strawberry');
D. INSERT INTO fruits (type, 'Strawberry'), (color, 'Red'); - ANSWER A. INSERT INTO fruits
(type, color) VALUES ('Strawberry', 'Red');
Which DROP statement deletes a column from an existing table?
A. DROP COLUMN column_name FROM table_name;
B. DROP table_name COLUMN column_name;
C. ALTER TABLE DROP COLUMN column_name FROM table_name;
D. ALTER TABLE table_name DROP COLUMN column_name; - ANSWER D. ALTER TABLE
table_name DROP COLUMN column_name;
What is an example of an expression in SQL?
1
,A. City = 'Beijing'
B. 134
C. INSERT
D. 'Welcome' - ANSWER A. City = 'Beijing'
What does the % operator return when using numeric values?
A. The quotient when dividing one value by another
B. The quotient when dividing one value by another
C. The additive inverse (i.e., opposite) of a value
D. The remainder when dividing one value by another - ANSWER D. The remainder when
dividing one value by another
You are inserting a new record into a table. The primary key column is using an auto-incre-
menting integer. What value should you specify for the primary key column in your INSERT
statement?
A. Omit the primary key column from the INSERT statement
B. Include the primary key column and specify a value of 0
2
, C. Include the primary key column and specify a negative value
D. Omit any column with an integer data type - ANSWER A. Omit the primary key col-
umn from the INSERT statement
Which language element includes a term with a special meaning for the language processor?
A. Literal
B. Keyword
C. Identifier
D. Expression - ANSWER B. Keyword
Which statement uses valid syntax for the DELETE statement in SQL?
A. DELETE FROM table_name WHERE condition;
B. DELETE table_name WHERE condition;
C. DELETE * FROM table_name WHERE condition;
D. DELETE FROM table_name; - ANSWER A. DELETE FROM table_name WHERE condi-
tion;
Which SQL command uses the correct syntax to add a new employee John Doe to the Em-
ployee table?
3
umns, respectively, in the 'fruits' table?
A. INSERT INTO fruits (type, color) VALUES ('Strawberry', 'Red');
B. INSERT INTO fruits (type, color) VALUES ('Strawberry', 'Red', 'Seedless');
C. INSERT INTO fruits (type, color) VALUES ('Red', 'Strawberry');
D. INSERT INTO fruits (type, 'Strawberry'), (color, 'Red'); - ANSWER A. INSERT INTO fruits
(type, color) VALUES ('Strawberry', 'Red');
Which DROP statement deletes a column from an existing table?
A. DROP COLUMN column_name FROM table_name;
B. DROP table_name COLUMN column_name;
C. ALTER TABLE DROP COLUMN column_name FROM table_name;
D. ALTER TABLE table_name DROP COLUMN column_name; - ANSWER D. ALTER TABLE
table_name DROP COLUMN column_name;
What is an example of an expression in SQL?
1
,A. City = 'Beijing'
B. 134
C. INSERT
D. 'Welcome' - ANSWER A. City = 'Beijing'
What does the % operator return when using numeric values?
A. The quotient when dividing one value by another
B. The quotient when dividing one value by another
C. The additive inverse (i.e., opposite) of a value
D. The remainder when dividing one value by another - ANSWER D. The remainder when
dividing one value by another
You are inserting a new record into a table. The primary key column is using an auto-incre-
menting integer. What value should you specify for the primary key column in your INSERT
statement?
A. Omit the primary key column from the INSERT statement
B. Include the primary key column and specify a value of 0
2
, C. Include the primary key column and specify a negative value
D. Omit any column with an integer data type - ANSWER A. Omit the primary key col-
umn from the INSERT statement
Which language element includes a term with a special meaning for the language processor?
A. Literal
B. Keyword
C. Identifier
D. Expression - ANSWER B. Keyword
Which statement uses valid syntax for the DELETE statement in SQL?
A. DELETE FROM table_name WHERE condition;
B. DELETE table_name WHERE condition;
C. DELETE * FROM table_name WHERE condition;
D. DELETE FROM table_name; - ANSWER A. DELETE FROM table_name WHERE condi-
tion;
Which SQL command uses the correct syntax to add a new employee John Doe to the Em-
ployee table?
3