Questions Related to databases

Multiple choice technology databases
  1. The two statements produce identical results.

  2. The second statement returns a syntax error

  3. There is no need to specify DESC because the results are sorted in descending order by default

  4. The two statements can be made to produce identical results by adding a column alias for the salary column in the second SQL statement.

Reveal answer Fill a bubble to check yourself
A Correct answer
Multiple choice technology databases
  1. SELECT TO_DATE(SYSDATE, 'FMDAY, DD Month, YYYY') FROM dual;

  2. SELECT TO_CHAR(SYSDATE, 'FMDD, DY Month, 'YYYY') FROM dual;

  3. SELECT TO_CHAR(SYSDATE, 'FMDay, DD Month, YYYY') FROM dual;

  4. SELECT TO_CHAR(SYSDATE, 'FMDY, DDD Month, YYYY') FROM dual;

  5. SELECT TO_DATE(SYSDATE, 'FMDY, DDD Month, YYYY') FROM dual;

Reveal answer Fill a bubble to check yourself
C Correct answer
Multiple choice technology databases
  1. INSTR returns the numeric position of a named character.

  2. NVL2 returns the first non-null expression in the expression list.

  3. DECODE translates an expression after comparing it to each search value

  4. TRIM trims the heading of trailing characters (or both) from a character string

  5. NVL compares two expressions and returns null if they are equal, or the first expression of they are not equal

  6. NULLIF compares twp expressions and returns null if they are equal, or the first expression if they are not equal

Reveal answer Fill a bubble to check yourself
A,C,D,F Correct answer