Tag: databases

Questions Related to databases

  1. Primary key access

  2. Access via unique index

  3. Table access by ROWID

  4. Full table scan


Correct Option: C

To produce a meaningful result set without any cartesian products, what is the minimum number of conditions that should appear in the WHERE clause of a four-table join?

  1. 8

  2. 2

  3. 3

  4. 4

  5. 5


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.

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

  1. System tablespace

  2. Users tablespace

  3. Default tablespace for the user

  4. Oracle will give an error

  5. Undefined


Correct Option: C
  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

Which character function can be used to return a specified portion of a character string

  1. INSTR

  2. SUBSTRING

  3. SUBSTR

  4. POS


Correct Option: C

Which command will delete all data from a table and will not write to the rollback segment?

  1. DROP

  2. DELETE

  3. CASCADE

  4. TRUNCATE


Correct Option: D
  1. Column

  2. 1966_Invoices

  3. Catch_#22

  4. #Invoices

  5. None of the above


Correct Option: D