Tag: databases

Questions Related to databases

  1. returns all the matching rows from 2 tables.

  2. returns only the rows from the first table, which have non-matching values with the second table in the field on which the 2 tables are joined.

  3. returns all rows from 2 tables.

  4. returns all rows that have matching value in the field on which the 2 tables are joined.


Correct Option: D

What is an index?

  1. An index is the same as alias.

  2. An index is a special way to join 2 or more tables.

  3. An index is a database table attribute, which speeds-up data search within a table.

  4. An index is a database row attribute, which speeds-up data search within a table.


Correct Option: C

Which of the following SQL statements is correct?

  1. TRUNCATE Sales TABLE

  2. TRUNCATE * FROM TABLE Sales

  3. TRUNCATE TABLE Sales

  4. TRUNCATE * FROM COLUMN Sales


Correct Option: C

AI Explanation

To answer this question, you need to understand the correct syntax for the TRUNCATE statement in SQL. Let's go through each option to understand why it is correct or incorrect:

A) TRUNCATE Sales TABLE - This option is incorrect because the correct syntax for the TRUNCATE statement does not include the keyword "TABLE" after the table name. The correct syntax is "TRUNCATE TABLE Sales."

B) TRUNCATE * FROM TABLE Sales - This option is incorrect because the TRUNCATE statement does not use the "FROM" keyword or the asterisk (*) to specify columns or rows to be truncated. The correct syntax is "TRUNCATE TABLE Sales."

C) TRUNCATE TABLE Sales - This option is correct because it follows the correct syntax for the TRUNCATE statement in SQL. The "TRUNCATE TABLE" syntax is used to delete all rows from a table without logging individual row deletions. The "Sales" in this statement is the name of the table to be truncated.

D) TRUNCATE * FROM COLUMN Sales - This option is incorrect because the TRUNCATE statement does not use the "FROM" keyword or the "COLUMN" keyword. The correct syntax is "TRUNCATE TABLE Sales."

The correct answer is C. This option is correct because it follows the correct syntax for the TRUNCATE statement in SQL, which is "TRUNCATE TABLE [table_name]". In this case, the table name is "Sales."

  1. Removal of data redundancy

  2. The introduction of data redundancy

  3. The introduction of non-first normal form relations

  4. The introduction of SQL*Plus


Correct Option: B
  1. Access. Constant. Information. Data.

  2. Atomicity. Consistency. Isolation. Durability.

  3. Access. Constraint. Index. Data.

  4. Access. Consistency. Isolation. Data.


Correct Option: B
  1. UPDATE, DELETE, INSERT and SELECT statements.

  2. UPDATE statements only.

  3. DELETE statements only.

  4. INSERT statements only.


Correct Option: A

Which three definitions are associated with implicit cursors?

  1. %rowtype, %toomanyrows, %found

  2. %found, %notfound, %rowcount

  3. %rowtype, %rowcount, %notfound

  4. None of the above


Correct Option: B