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
Similar Resources on Wayground
20 questions
Database Concepts Quiz

Quiz
•
University
10 questions
DBMS Lab quizII

Quiz
•
University
15 questions
BPO Industry Quiz

Quiz
•
10th Grade - University
10 questions
N1 & C1 DBMS LAB QUIZ

Quiz
•
University
20 questions
Comandos DDL

Quiz
•
University
10 questions
DBMS 1

Quiz
•
University
18 questions
Chapter 1 - 2 Review -- 4-8-2024

Quiz
•
University
20 questions
Database Concepts Quiz

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University