Tag: databases

Questions Related to databases

Which of the following are system privileges? (Choose two)

  1. DELETE

  2. SELECT

  3. CREATE TABLE

  4. UPDATE

  5. DROP TABLE


Correct Option: C,E

AI Explanation

To answer this question, we need to understand what system privileges are and which options fall under this category.

System privileges are permissions that allow a user to perform certain actions or operations within a database management system. These privileges typically involve administrative tasks that affect the structure or configuration of the database.

Let's go through each option to understand why it is correct or incorrect:

Option A) DELETE - This option is not a system privilege. DELETE is a database operation that allows a user to remove rows from a table, but it does not involve administrative or structural changes to the database.

Option B) SELECT - This option is not a system privilege. SELECT is a database operation that allows a user to retrieve data from a table, but it does not involve administrative or structural changes to the database.

Option C) CREATE TABLE - This option is a system privilege. CREATE TABLE is a database operation that allows a user to create new tables in the database. This privilege involves administrative control over the structure of the database.

Option D) UPDATE - This option is not a system privilege. UPDATE is a database operation that allows a user to modify data in a table, but it does not involve administrative or structural changes to the database.

Option E) DROP TABLE - This option is a system privilege. DROP TABLE is a database operation that allows a user to delete a table from the database. This privilege involves administrative control over the structure of the database.

The correct answer is C) CREATE TABLE and E) DROP TABLE. These options are system privileges because they involve administrative control and structural changes to the database.

Which of the following data dictionary views displays the objects owned by the user?

  1. DICTIONARY

  2. TABLE_PRIVILEGES

  3. ALL_VIEWS

  4. USER_OBJECTS


Correct Option: D

AI Explanation

To answer this question, we need to understand the purpose of each data dictionary view.

Option A) DICTIONARY - This option is incorrect because the DICTIONARY view does not display the objects owned by the user. It provides information about the database dictionary itself.

Option B) TABLE_PRIVILEGES - This option is incorrect because the TABLE_PRIVILEGES view displays information about the table-level privileges granted to users, not the objects owned by the user.

Option C) ALL_VIEWS - This option is incorrect because the ALL_VIEWS view displays information about all views accessible to the user, not just the ones owned by the user.

Option D) USER_OBJECTS - This option is correct because the USER_OBJECTS view displays information about the objects owned by the user. It includes tables, views, indexes, sequences, procedures, functions, packages, and synonyms.

Therefore, the correct answer is option D) USER_OBJECTS. This option is correct because it displays the objects owned by the user.

  1. 0

  2. NULL

  3. Depends on the scale and precision of the datatype.

  4. Without initialization, a variable cannot be used in the executable section of the block.


Correct Option: B
  1. When you disconnect from your session abnormally

  2. After PL/SQL block is executed successfully

  3. When you issue TRUNCATE command at SQL prompt

  4. When COMMIT command is issued

  5. When each UPDATE statement is executed


Correct Option: C,D
  1. SQL statements can be on one or more lines.

  2. Keywords cannot be split across lines.

  3. SQL statements are not case-sensitive, unless indicated.

  4. Keywords can be abbreviated.

  5. Place a slash on the last line in the buffer.

  6. You can use arithmetic operators in any clause of a SQL statement.


Correct Option: C,D
  1. DECLARE V_Destination_India Number;

  2. DECLARE V_123, V_213, V_132 Varchar2(10);

  3. DECLARE V_sys Boolean := 1;

  4. DECLARE V_destination_India Number(4);

  5. DECLARE V_Hiredate NOT NULL DATE := '01-JAN-00';


Correct Option: B,C,E