Home »
MCQs »
Oracle MCQs
Oracle Tables MCQs
Oracle Tables MCQs: This section contains multiple-choice questions and answers on Tables in Oracle.
Submitted by Anushree Goswami, on June 05, 2022
1. A new table is created in an Oracle database using the ____ TABLE statement.
- CREATE
- UPDATE
- ALTER
- NEW
Answer: A) CREATE
Explanation:
A new table is created in an Oracle database using the CREATE TABLE statement.
Discuss this Question
2. Tables are created by _____ types for each column.
- Naming them
- Defining their Columns
- Specifying the Data
- All of the above
Answer: D) All of the above
Explanation:
Tables are created by naming them, defining their columns, and specifying the data types for each column.
Discuss this Question
3. What is the syntax to create a table?
- CREATE TABLE
- CREATE COLUMN
- CREATE ROW
- CREATE DATABASE
Answer: A) CREATE TABLE
Explanation:
Syntax to create a table is CREATE TABLE.
Discuss this Question
4. What does the table_name in syntax specifies?
- Specifies the table name that you would like to create.
- Specifies the table number that you would like to create.
- Specifies the table row that you would like to create.
- Specifies the table column that you would like to create.
Answer: A) Specifies the table name that you would like to create
Explanation:
The table_name in syntax specifies the table name that you would like to create.
Discuss this Question
5. What the column must have while creation?
- Dataset
- Datatype
- Datalink
- Database
Answer: B) Datatype
Explanation:
Columns must have Datatypes while creation.
Discuss this Question
6. While creating table, the column should be specified as ____.
- NULL
- NOT NULL
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
While creating a table, the column should be specified as either NULL or NOT NULL.
Discuss this Question
7. What is the value of the column by default, if the value is left blank?
- NULL
- NOT NULL
- 0
- 1
Answer: A) NULL
Explanation:
The value of the column is NULL by default if the value is left blank.
Discuss this Question
8. ____ keys are single fields or combinations of fields that contain unique information about the record.
- Primary
- Alternate
- Foreign
- Composite
Answer: A) Primary
Explanation:
Primary keys are single fields or combinations of fields that contain unique information about the record.
Discuss this Question
9. Primary keys cannot contain ____ values in any field.
- Null
- 0
- 1
- Not Null
Answer: A) Null
Explanation:
Primary keys cannot contain null values in any field.
Discuss this Question
10. Primary keys can only be found in ____ table at a time.
- One
- Two
- Three
- Multiple
Answer: A) One
Explanation:
Primary keys can only be found on one table at a time.
Discuss this Question
11. By copying the columns of an existing table, the CREATE TABLE __ statement creates a new table based on an existing table.
- AS
- IN
- ON
- FOR
Answer: A) AS
Explanation:
By copying the columns of an existing table, the CREATE TABLE AS statement creates a new table based on an existing table.
Discuss this Question
12. A new table will contain records from the ___ table if it is created using the CREATE TABLE AS method.
- Existing
- New
- Redundant
- None
Answer: A) Existing
Explanation:
A new table will contain records from the existing table if it is created using the CREATE TABLE AS method.
Discuss this Question
13. What is the syntax of CREATE TABLE AS?
- CREATE TABLE table_name AS (SELECT*FROM previoustable_name)
- CREATE TABLE table_name IN (SELECT*FROM previoustable_name)
- CREATE TABLE table_name FROM (SELECT*FROM previoustable_name)
- CREATE TABLE table_name AT (SELECT*FROM previoustable_name)
Answer: A) CREATE TABLE table_name AS (SELECT*FROM previoustable_name)
Explanation:
Syntax of CREATE TABLE AS is CREATE TABLE table_name AS (SELECT*FROM previoustable_name).
Discuss this Question
14. The ALTER TABLE statement specifies whether a column should be ____ or deleted in a table in Oracle.
- Added
- Modified
- Dropped
- All of the above
Answer: D) All of the above
Explanation:
The ALTER TABLE statement specifies whether a column should be added, modified, dropped, or deleted in a table in Oracle.
Discuss this Question
15. ALTER TABLE is also used to ____ the table.
- Revert
- Rename
- Resize
- Reuse
Answer: B) Rename
Explanation:
ALTER TABLE is also used to rename the table.
Discuss this Question
16. What is the syntax to add column in the table?
- ALTER TABLE table_name ADD column_name column-definition;
- ALTER TABLE table_name ALTER column_name column-definition;
- ALTER TABLE table_name UPDATE column_name column-definition;
- ALTER TABLE table_name NEW column_name column-definition;
Answer: A) ALTER TABLE table_name ADD column_name column-definition;
Explanation:
Syntax to add column in the table is,
ALTER TABLE table_name ADD column_name column-definition;
Discuss this Question
17. What is the statement to modify the column in the table?
- MODIFY
- MODULE
- UPDATE
- ALTER
Answer: A) MODIFY
Explanation:
The statement to modify the column in the table is MODIFY.
Discuss this Question
18. What is the statement to drop a column in the table?
- DROP ROW
- DELETE ROW
- DROP COLUMN
- DELETE COLUMN
Answer: C) DROP COLUMN
Explanation:
The statement to drop a column in the table is DROP COLUMN.
Discuss this Question
19. What is the statement to rename a column in the table?
- RENAME COLUMN
- RENAME ROW
- RECHANGE COLUMN
- UPDATE COLUMN NAME
Answer: A) RENAME COLUMN
Explanation:
The statement to rename a column in the table is RENAME COLUMN.
Discuss this Question
20. You can drop a table from the Oracle database by using the ____ statement.
- DROP COLUMN
- DROP ROW
- DROP DATABASE
- DROP TABLE
Answer: D) DROP TABLE
Explanation:
You can drop a table from the Oracle database by using the DROP TABLE statement.
Discuss this Question
21. What is/are the parameter(s) in DROP TABLE?
- Schema_name and table_name
- CASCADE CONSTRAINTS
- PURGE
- All of the above
Answer: D) All of the above
Explanation:
The parameters in DROP TABLE are,
- Schema_name and table_name
- CASCADE CONSTRAINTS
- PURGE
Discuss this Question
22. The schema owned by a table is specified by what?
- Schema_name
- Table_name
- CASCADE CONSTRAINS
- PURGE
Answer: A) Schema_name
Explanation:
The schema owned by a table is specified by schema_name.
Discuss this Question
23. In addition to eliminating all ____ integrity constraints, CASCADE CONSTRAINTS will also drop all other constraints.
- Consecutive
- Sequential
- Referential
- Relational
Answer: C) Referential
Explanation:
In addition to eliminating all referential integrity constraints, CASCADE CONSTRAINTS will also drop all other constraints.
Discuss this Question
24. With ____, the table and all its dependent objects are removed from the database and are not recoverable.
- CASCADE
- CASCADE CONSTRAINS
- PURGE
- None
Answer: C) PURGE
Explanation:
With PURGE, the table and all its dependent objects are removed from the database and are not recoverable.
Discuss this Question
25. Oracle will ____ the table if there is a referential integrity constraint on table_name that is not specified as CASCADE CONSTRAINTS on the DROP TABLE statement.
- Not Drop
- Drop
- Not Delete
- Delete
Answer: A) Not Drop
Explanation:
Oracle will not drop the table if there is a referential integrity constraint on table_name that is not specified as CASCADE CONSTRAINTS on the DROP TABLE statement.
Discuss this Question
26. The main difference between temporary tables and ordinary tables is that temporary tables cannot have ____ keys related to other tables.
- Primary
- Foreign
- Composite
- Alternate
Answer: B) Foreign
Explanation:
The main difference between temporary tables and ordinary tables is that temporary tables cannot have foreign keys related to other tables.
Discuss this Question
27. The _____ and block types are all available to temporary tables.
- Triggers
- Join Cardinality
- Information about rows
- All of the above
Answer: D) All of the above
Explanation:
The triggers, join cardinality, information about rows, and block types are all available to temporary tables.
Discuss this Question
28. With Oracle database, data is managed in an ____ manner (1).
- Open
- Integrated
- Complete
- All of the above
Answer: D) All of the above
Explanation:
With the Oracle database, data is managed in an open, integrated, and complete manner.
Discuss this Question
29. What is the syntax of creating global temporary tables?
- CREATE GLOBAL TEMPORARY TABLE
- CREATE LOCAL TEMPORARY TABLE
- CREATE TEMPORARY TABLE
- None
Answer: A) CREATE GLOBAL TEMPORARY TABLE
Explanation:
The syntax for creating global temporary tables is CREATE GLOBAL TEMPORARY TABLE.
Discuss this Question
30. ____ temporary tables in Oracle are distinct from temporary tables within modules.
- Global
- Null
- Local
- Not Null
Answer: C) Local
Explanation:
Local temporary tables in Oracle are distinct from temporary tables within modules.
Discuss this Question
31. Oracle's temporary tables are local to the ____ in which they are created and cannot be accessed outside of that ____.
- Session
- Time
- Date
- None
Answer: A) Session
Explanation:
Oracle's temporary tables are local to the session in which they are created and cannot be accessed outside of that session.
Discuss this Question
32. What is the syntax to declare the local temporary tables?
- DECLARE TABLES
- DECLARE TEMPORARY TABLE
- DECLARE LOCAL TEMPORARY TABLE
- DECLARE GLOBAL TEMPORARY TABLE
Answer: C) DECLARE LOCAL TEMPORARY TABLE
Explanation:
The syntax to declare the local temporary tables is DECLARE LOCAL TEMPORARY TABLE.
Discuss this Question