SQL and Database Quiz
Quiz
•
Computers
•
University
•
Medium
Pavan Madhvesh
Used 6+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which command is used to rollback the last transaction?
COMMIT;
ROLLBACK;
SAVEPOINT;
UNDO;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How to add a primary key constraint to an existing table?
ALTER TABLE Employee ADD PRIMARY KEY (EMPNO);
ALTER Employee ADD PRIMARY KEY (EMPNO);
ADD PRIMARY KEY TO Employee (EMPNO);
ALTER Employee TABLE ADD PRIMARY KEY (EMPNO);
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How to add a NOT NULL constraint to a column?
ALTER TABLE Employee ADD CONSTRAINT NOT NULL (EMPNO);
ALTER TABLE Employee MODIFY EMPNO NOT NULL;
ALTER TABLE Employee ADD NOT NULL (EMPNO);
ALTER Employee MODIFY COLUMN EMPNO NOT NULL;
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which command is used to insert a new record into a table?
INSERT INTO Employee VALUES (101, 'John', 'Manager', 1001, 5000, NULL);
ADD INTO Employee VALUES (101, 'John', 'Manager', 1001, 5000, NULL);
INSERT INTO Employee SET (101, 'John', 'Manager', 1001, 5000, NULL);
INSERT INTO Employee SET VALUES (101, 'John', 'Manager', 1001, 5000, NULL);
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How to add a new column to an existing table?
ALTER TABLE Employee ADD COLUMN commission DECIMAL(10,2);
ALTER Employee ADD COLUMN commission DECIMAL(10,2);
ALTER TABLE Employee MODIFY commission DECIMAL(10,2);
ALTER Employee TABLE ADD COLUMN commission DECIMAL(10,2);
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How to update the details of a column in a table?
UPDATE Employee SET JOB = 'Developer' WHERE EMPNO = 101;
MODIFY Employee SET JOB = 'Developer' WHERE EMPNO = 101;
CHANGE Employee SET JOB = 'Developer' WHERE EMPNO = 101;
ALTER Employee SET JOB = 'Developer' WHERE EMPNO = 101;
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How to rename a column in a table?
ALTER TABLE Employee RENAME COLUMN commission TO bonus;
CHANGE Employee RENAME COLUMN commission TO bonus;
MODIFY Employee RENAME COLUMN commission TO bonus;
RENAME Employee RENAME COLUMN commission TO bonus;
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
20 questions
Security Threats and Trust Boundaries
Quiz
•
University
10 questions
How well do you know the Dream SMP?
Quiz
•
6th Grade - University
20 questions
System and network support and management
Quiz
•
11th Grade - Professi...
15 questions
POST-TEST MODUL 1 APSI
Quiz
•
University
15 questions
ER MODEL
Quiz
•
University
13 questions
Tech Vocab I
Quiz
•
1st Grade - University
10 questions
CHAPTER 1: COMPUTER SECURITY REVIEW
Quiz
•
University
15 questions
MS. Excel
Quiz
•
12th Grade - University
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
Discover more resources for Computers
10 questions
Halloween Movies Trivia
Quiz
•
5th Grade - University
12 questions
Halloween
Quiz
•
3rd Grade - University
5 questions
Using Context Clues
Interactive video
•
4th Grade - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
14 questions
Eat Healthy,Be Healty
Quiz
•
4th Grade - University
7 questions
History of Halloween: Pagan or Christian?
Interactive video
•
11th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
