Tag: databases

Questions Related to databases

  1. A flat file called "plan_table.txt"

  2. Oracle Table called "plan_table"

  3. Oracle Table called "plan table"

  4. A flat file called "plan_table.tbl"


Correct Option: B
  1. It's advisable to choose the driving table with maximum number of records

  2. Number of records is NOT the criteria while selecting driving table

  3. It's advisable to choose the driving table with less number of records

  4. Driving table is always the last table accessed by the Optimizer


Correct Option: C
  1. Optimizer will return parse error if expressions are used on columns in the predicate

  2. Optimizer does not use index if expressions are used on the columns in the predicate, even if one exists

  3. It makes no difference with / without expressions on the columns in the predicate

  4. Using expressions on the columns in the predicate won't get benefits of using Table Alias


Correct Option: B
  1. 10th row

  2. 1st row

  3. no rows returned

  4. First 10 rows


Correct Option: C
Explanation:

To solve this question, the user needs to have basic knowledge of SQL and the concept of the rownum keyword in SQL.

The rownum keyword is used to assign a unique number to each row returned by a query in Oracle. It is often used to limit the number of rows returned by a query.

Now, let's go through each option and explain why it is right or wrong:

A. 10th row: This option is incorrect. The rownum keyword assigns a unique number to each row returned by a query. However, the where clause in the given SQL limits the result set to only the row where rownum equals 10. This means that the SQL query will only return one row, and that row will be the 10th row in the result set.

B. 1st row: This option is incorrect. The where clause in the given SQL limits the result set to only the row where rownum equals 10. This means that the SQL query will only return one row, and that row will be the 10th row in the result set.

C. no rows returned: This option is incorrect. The SQL query will return one row, which is the 10th row in the result set.

D. First 10 rows: This option is incorrect. The where clause in the given SQL limits the result set to only the row where rownum equals 10. This means that the SQL query will only return one row, and that row will be the 10th row in the result set.

The Answer is: C

When a user creates an object without a TABLESPACE clause, where will Oracle store the segment?

  1. System tablespace

  2. Default tablespace for the user

  3. Users tablespace

  4. Oracle will give an error


Correct Option: B