Home »
MCQs »
Oracle MCQs
Oracle Change Password, Check Constraints, Comments, and Primary Key MCQs
Oracle Change Password, Check Constraints, Comments, and Primary Key MCQs: This section contains multiple-choice questions and answers on Change Password, Check Constraints, Comments, and Primary Key in Oracle.
Submitted by Anushree Goswami, on June 29, 2022
1. Using Oracle's ____ command, we can change our passwords.
- Alter
- Change
- New
- Remove
Answer: A) Alter
Explanation:
Using Oracle's alter command, we can change our passwords.
Discuss this Question
2. What is the syntax to Change Password?
- ALTER USER user_name IDENTIFIED BY old_password;
- ALTER user_name IDENTIFIED BY new_password;
- ALTER USER user_name new_password;
- ALTER USER user_name IDENTIFIED BY new_password;
Answer: D) ALTER USER user_name IDENTIFIED BY new_password;
Explanation:
The syntax to Change Password is:
ALTER USER user_name IDENTIFIED BY new_password;
Discuss this Question
3. What are the parameters in Change Password?
- User_name
- New_password
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
The parameters in Change Password are, "user_name" and "new_password".
Discuss this Question
4. Each ____ of a table has a specific condition for Check Constraints in Oracle.
- Column
- Row
- Field
- Record
Answer: B) Row
Explanation:
Each row of a table has a specific condition for Check Constraints in Oracle.
Discuss this Question
5. What are the parameters in the syntax to check the constraints using CREATE TABLE statement?
- Table_name
- Constraint_name
- Column_name
- All of the above
Answer: D) All of the above
Explanation:
The parameters in the syntax to check the constraints using CREATE TABLE statement are table_name, constraint_name and column_name.
Discuss this Question
6. It is possible to post ____ comments.
- Single-line
- Multi-line
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
It is possible to post single-line comments as well as multi-line comments.
Discuss this Question
7. What is the syntax to comment on a single line?
- -- comment
- /* comment */
- /* comment
- comment */
Answer: A) -- comment
Explanation:
The syntax to comment on a single line is "-- comment".
Discuss this Question
8. What is the syntax to comment on multi lines?
- /* comment */
- /* comment
- comment */
- */ comment /*
Answer: A) /* comment */
Explanation:
The syntax to comment on multi lines is "/* comment */".
Discuss this Question
9. ____ keys in Oracle are columns with unique values, and they cannot contain nulls.
- Primary
- Foreign
- Alternate
- Composite
Answer: A) Primary
Explanation:
Primary keys in Oracle are columns with unique values, and they cannot contain nulls.
Discuss this Question
10. ____ primary key is allowed in a table.
- One
- Two
- Three
- Four
Answer: A) One
Explanation:
One primary key is allowed in a table.
Discuss this Question
11. What is/are the parameter(s) in the syntax of using primary key in CREATE TABLE statement?
- Table_name
- Constraint_name
- Column_1, column_2,...,column_n
- All of the above
Answer: D) All of the above
Explanation:
The parameter in the syntax of using primary key in CREATE TABLE statement is -
- Table_name
- Constraint_name
- Column_1, column_2,...,column_n
Discuss this Question
12. What is/are the clause(s) in the syntax of using primary key in ALTER TABLE statement?
- ALTER TABLE
- ADD CONSTRAINT
- PRIMARY KEY
- All of the above
Answer: D) All of the above
Explanation:
The clauses in the syntax of using primary key in ALTER TABLE statement are -
- ALTER TABLE
- ADD CONSTRAINT
- PRIMARY KEY
Discuss this Question
13. Syntax to Drop Primary Key is -
- ALTER TABLE DROP CONSTRAINT constraint_name;
- ALTER TABLE table_name DROP CONSTRAINT;
- ALTER TABLE table_name DROP CONSTRAINT constraint_name;
- ALTER TABLE DROP CONSTRAINT;
Answer: C) ALTER TABLE table_name DROP CONSTRAINT constraint_name;
Explanation:
Syntax to Drop Primary Key is:
ALTER TABLE table_name DROP CONSTRAINT constraint_name;
Discuss this Question
14. Syntax to Disable Primary Key is -
- ALTER TABLE DISABLE CONSTRAINT constraint_name;
- ALTER TABLE table_name DISABLE CONSTRAINT;
- ALTER TABLE DISABLE CONSTRAINT;
- ALTER TABLE table_name DISABLE CONSTRAINT constraint_name;
Answer: D) ALTER TABLE table_name DISABLE CONSTRAINT constraint_name;
Explanation:
Syntax to Disable Primary Key is
ALTER TABLE table_name DISABLE CONSTRAINT constraint_name;
Discuss this Question
15. Syntax to Enable Primary Key is -
- ALTER TABLE ENABLE CONSTRAINT constraint_name;
- ALTER TABLE table_name ENABLE CONSTRAINT;
- ALTER TABLE table_name constraint_name;
- ALTER TABLE table_name ENABLE CONSTRAINT constraint_name;
Answer: D) ALTER TABLE table_name ENABLE CONSTRAINT constraint_name;
Explanation:
Syntax to Enable Primary Key is:
ALTER TABLE table_name ENABLE CONSTRAINT constraint_name;
Discuss this Question