SQL Data Definition Language MCQ

SQL Data Definition Language MCQs : 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?

A. Data Definition Language(DDL)
B. Data Manipulation Language(DML)
C. DML and DDL
D. None of the Mentioned

View Answer


2. What options did ALTER DATABASE statement add?

A. DATABASE SNAPSHOT syntax
B. ATTACH_REBUILD_LOG clause
C. DB_CHAINING option
D. READ_COMMITTED_SNAPSHOT

View Answer


3. Which of the following is/are the DDL statements?

A. Create
B. Drop
C. Alter
D. All of the Mentioned

View Answer


4. In SQL, which of the following is not a data definition language commands?

A. RENAME
B. REVOKE
C. GRANT
D. UPDATE

View Answer


5.  SQL has how many main commands for DDL:

A. 1
B. 2
C. 3
D. 4

View Answer


6. Which command allows the removal of all rows from a table but flushes a table more efficiently since no rollback information is retained:

A. TRUNCATE command
B. Create command
C. Drop table command
D. Alter table command

View Answer


7. Which of the following statement removes database including its related components?

A. DROP DATABASE
B. DELETE DATABASE
C. REMOVE DATABASE
D. None of the mentioned

View Answer


8. Point out the correct statement.

A. When a database is dropped, the master database should be backed up
B. You can drop a database currently being used
C. Dropping a database snapshot does not delete the database snapshot from an instance of SQL Server
D. None of the mentioned

View Answer


9. Which of the following statement removes sales and suppliers database?

A. DROP DATABASE Sales, NewSales
B. DROP DATABASE Sales, suppliers
C. DROP DATABASE Sales and suppliers
D. DROP DATABASE Sales-suppliers

View Answer


10.  View used used for displaying current status of database is ___________

A. system.databases
B. current.databases
C. sys.databases
D. status.databases

View Answer


11. Command that is used to add attributes to an existing relation, is said to be

A. Alter
B. Modify
C. Tailor
D. Eliminate

View Answer


12. All tuples in the relation are assigned null as the value for the new attribute, in the

A. Alter Command
B. Select Command
C. Delete Command
D. Create Command

View Answer


13. Which requirements can be implemented using a CHECK constraint?

A. Customer must be greater than 21 years old
B. Customer must have a residence in an Asian Country
C. Both A and B
D. None of the above

View Answer


14. Which requirements can be implemented using a CHECK constraint?

A. Customer must have a name
B. Two customers cannot have same email id
C. Both A and B
D. None of the above

View Answer


15. Which of the following statements are TRUE?

A. A Unique constraint allows multiple rows to have NULL value
B. Integrity constraint can be added to a table even if table data is in violation
C. A PRIMARY KEY allows a single row to contain NULL
D. Both A and B

View Answer


16. Which statement is TRUE regarding ALTER statement?

A. ALTER TABLE cannot be used to remove a column
B. ALTER table can be used to change size of data type, not the data type itself
C. ALTER table can be used to add a column but it must be NOT NULL
D. None of the above

View Answer


17. Which statement would add a column CGPA to a table Student which is already created

A. ALTER TABLE Student ADD COLUMN (CGPA NUMBER(3,1));
B. ALTER TABLE Student CGPA NUMBER(3,1);
C. ALTER TABLE Student ADD (CGPA NUMBER(3,1));
D. Both A and C

View Answer


18. Point out the correct statement.

A. When a database is dropped, the master database should be backed up
B. You can drop a database currently being used
C. Dropping a database snapshot does not delete the database snapshot from an instance of SQL Server
D. None of the mentioned

View Answer


19. All tuples in the relation are assigned null as the value for the new attribute, in the

A. Modify command
B. Tailor command
C. Eliminate command
D. Alter command

View Answer


20.  To delete a particular column in a relation the command used is:

A. UPDATE TABLE
B. TRUNCATE COLUMN
C. ALTER , DROP
D. DELETE COLUMN

View Answer





Also check :


Discussion



* You must be logged in to add comment.