
SQL Operations Quiz
Authored by ARLENE QUICAY
Computers
Professional Development
Used 5+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the error in the following SQL command for creating the Course table? CourseDescription TEXT(200),
TEXT is not a valid data type
TEXT data type cannot take a length parameter
VARCHAR should be used instead of TEXT
200 is too large for TEXT
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is wrong with the CHECK constraint in the Staff table? CHECK (Role ('AdministrativeStaff', 'Lecturer'))
Incorrect syntax for CHECK constraint
Role is not a valid column name
Parentheses should be square brackets
No error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The Receipt table is missing which punctuation mark in its definition?
Semicolon after each column
Comma after the PRIMARY KEY definition
Closing parenthesis
Quotation marks around column names
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the INSERT statement for the Staff table, which part causes an error? '2022-11-25);
Missing closing parenthesis
Incorrect date format
Mismatched quotation marks
Duplicate StaffID
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a correct CREATE TABLE syntax for foreign key definition?
FOREIGN KEY REFERENCES TableName(ColumnName)
FOREIGN KEY (ColumnName) REFERENCES TableName(ColumnName)
FOREIGN REFERENCES TableName(ColumnName)
KEY FOREIGN TableName(ColumnName)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which SQL command correctly updates a student's phone number?
MODIFY Student SET ParentsPhone = '09991234567' WHERE StudentID = 'S001';
ALTER TABLE Student SET ParentsPhone = '09991234567' WHERE StudentID = 'S001';
UPDATE Student SET ParentsPhone = '09991234567' WHERE StudentID = 'S001';
CHANGE Student SET ParentsPhone = '09991234567' WHERE StudentID = 'S001';
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if you try to update StudentID to an existing ID?
The database allows it silently
The system automatically merges records
A duplicate key error occurs
Nothing happens
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Microsoft
or continue with
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?