Tag: databases

Questions Related to databases

Which Oracle access method is the fastest way for Oracle to retrieve a single row?

  1. Primary key access

  2. Access via unique index

  3. Table access by ROWID

  4. Full table scan


Correct Option: C
  1. 03-JUL-00

  2. 10-JUL-00

  3. 12-JUL-00

  4. 11-JUL-00

  5. 17-JUL-00


Correct Option: E
Explanation:

To solve this question, the user needs to understand the function of each element of the SQL statement and how it affects the output.

The SQL statement is selecting a date and formatting it according to the given format string. Specifically:

  • sysdate returns the current date and time.
  • NEXT_DAY(sysdate, 'MONDAY') returns the next occurrence of the day specified as the second argument, after the current date and time (sysdate). In this case, it returns the next Monday after 10 July 2000, which is 17 July 2000.
  • to_char() converts the resulting date into a string using the format specified as the second argument. In this case, the format is 'DD-MON-RR', which returns the day of the month (DD), the abbreviated month name (MON), and the 2-digit year (RR).

Therefore, the correct answer is E. 17-JUL-00, as the SQL statement returns the formatted date of the next Monday after 10 July 2000, which is 17 July 2000.

  1. System tablespace

  2. Users tablespace

  3. Default tablespace for the user

  4. Oracle will give an error

  5. Undefined


Correct Option: C

The primary key on table EMP is the EMPNO column. Which of the following statements will not use the associated index on EMPNO?

  1. select * from EMP where nvl(EMPNO, '00000') = '59384'

  2. select * from EMP where EMPNO = '59384'

  3. select EMPNO, LASTNAME from EMP where EMPNO = '59384'

  4. select 1 from EMP where EMPNO = '59834'


Correct Option: A
  1. Column

  2. 1966_Invoices

  3. Catch_#22

  4. #Invoices

  5. None of the above


Correct Option: D