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?

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

View Answer


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

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

View Answer


3.  SQL has how many main commands for DDL:

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

View Answer


4. 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


5. 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


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

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

View Answer


7. 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


8. 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


9. 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


10. 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






Also check :


Discussion


* You must be logged in to add comment.