Oracle SQL Multiple Choice Questions and Answers on DDL Commands for Freshers

https://www.computersprofessor.com/2017/12/oracle-sql-multiple-choice-questions.html
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
Answer: a
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
Answer: d
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
Answer: a
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
Answer: a
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
Answer: c
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
Answer: b
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
Answer: c
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
Answer: a
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
Answer: b
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
Answer: a
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.