SQL Data Definition Language MCQ
This section focuses on the "Data Definition Language (DDL) " of the SQL. These Multiple Choice Questions (mcq) should be practiced to improve the SQL skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.
1. Which is the subset of SQL commands used to manipulate Oracle Database structures, including tables?
Explanation: The DDL is used to manage table and index structure.CREATE, ALTER, RENAME, DROP and TRUNCATE statements are the names of few data definition elements.
2. Which of the following is/are the DDL statements?
Explanation: All the mentioned commands are the part of DDL statements.
3. SQL has how many main commands for DDL:
Explanation: Create, Delete, Alter these are 3 main command.
4. Which of the following statement removes database including its related components?
Explanation: DROP statement adds support for dropping database snapshots.
5. Which of the following statement removes sales and suppliers database?
Explanation: DROP DATABASE can be used for removing multiple databases in one statement.
6. View used used for displaying current status of database is ___________
Explanation: sys.databases catalog view is used for displaying the present status of the system.
7. Command that is used to add attributes to an existing relation, is said to be
Explanation: Command that is used to add attributes to an existing relation, is said to be Alter.
8. Which requirements can be implemented using a CHECK constraint?
Explanation: Both A and B requirements can be implemented using a CHECK constraint
9. Which of the following statements are TRUE?
Explanation: A Unique constraint allows multiple rows to have NULL value is the following statements TRUE.
10. Which statement would add a column CGPA to a table Student which is already created
Explanation: ALTER TABLE Student ADD (CGPA NUMBER(3,1)); statement would add a column CGPA to a table Student which is already created.
Also check :