This set of Oracle Database Multiple Choice Questions & Answers (MCQs) focuses on “DDL Commands”.
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
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?
a) Create
b) Drop
c) Alter
d) All of the Mentioned
View Answer
Explanation: All the mentioned commands are the part of DDL statements.
3. In SQL, which command(s) is(are) used to change a table’s storage characteristics?
a) ALTER TABLE
b) MODIFY TABLE
c) CHANGE TABLE
d) All of the Mentioned
View Answer
Explanation: To change the structure of the table we use ALTER TABLE Syntax:
ALTER TABLE “table_name” ADD “column_name” datatype
OR
ALTER TABLE “table_name” DROP COLUMN “column_name”.
4. In SQL, which of the following is not a data definition language commands?
a) RENAME
b) REVOKE
c) GRANT
d) UPDATE
View Answer
Explanation: With RENAME statement you can rename a table.RENAME, REVOKE and GRANT are DDL commands and UPDATE is DML command.
5. ________clause is an additional filter that is applied to the result.
a) Select
b) Group-by
c) Having
d) Order by
View Answer
Explanation: The HAVING clause was added to SQL because the WHERE keyword could not be used with aggregate functions.
6. ___________ defines rules regarding the values allowed in columns and is the standard mechanism for enforcing database integrity.
a) Column
b) Constraint
c) Index
d) Trigger
View Answer
Explanation: SQL constraints are used to specify rules for the data in a table.If there is any violation between the constraint and the data action, the action is aborted by the constraint.
7. SQL has how many main commands for DDL:
a) 1
b) 2
c) 3
d) 4
View Answer
Explanation: Create, Delete, Alter these are 3 main command.
8. Which command defines its columns, integrity constraint in create table:
a) Create command
b) Drop table command
c) Alter table command
d) All of the Mentioned
View Answer
Explanation: The CREATE TABLE statement is used to create a table in a database.Tables are organized into rows and columns.
9. Which command is used for removing a table and all its data from the database:
a) Create command
b) Drop table command
c) Alter table command
d) All of the Mentioned
View Answer
Explanation: The DROP INDEX statement is used to delete an index in a table.
10. 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
Explanation: The SQL TRUNCATE TABLE command is used to delete complete data from an existing table.You can also use DROP TABLE command to delete complete table but it would remove complete table structure form the database and you would need to re-create this table once again if you wish you store some data.
Sanfoundry Global Education & Learning Series – Oracle Database.
To practice all areas of Oracle Database, here is complete set of 1000+ Multiple Choice Questions and Answers.
If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]
- Check Oracle Database Books
- Apply for Programming Internship
- Check Information Technology Books
- Practice Programming MCQs