MCQ – Multiple choice questions on SQL Database with answers and explanation. Many of the objective questions are asked in IT jobs written interviews.
Q)Combination of primary key with foreign key forms
- Parent child relationship between the tables that connect them
- Many to many relationship between the tables that connect them
- Network model between the tables connect them
- none of them
Answer: 1
Q)Match SQL language with SQL commands
1)DDL i)Revok, Grant
2)DML ii)rename a table
3)TCL iii)insert, update
4)DCL iv)rollback , commit
- 1-iii,2-i,3-ii,4-iv
- 1-iii,2-ii,3-iv,4-i
- 1-ii,2-iii,3-iv,4-i
- 1-i,2-iii,3-ii,4-iv
Answer: 3
Q)Types of SQL Trigger is/are in SQL database
- DDL
- DML
- LOGON
- ALL
Answer: 4
DML triggers fire with insert, delete and update operations
DDL triggers are executed with operations like creating a table
Logon triggers fire when a login connects SQL Server instance.
Q)Which is not DDL (data definition language) operation
- Renaming a table
- SQL create table
- Add a column to an existing table
- Update data into a table in SQL database
Answer: 4
Read detail about SQL sub language
Q)Which statement is correct? A table can have
- many primary key and many unique key
- one primary key and one unique key
- one primary key and many unique key
- many primary key and one unique key
Answer: 3
Q)SQL is used to access and manipulate data in SQL database
- MSAccess
- Oracle
- MySQL
- All
Answer: 4