Which two queries give the correct result?

View the Exhibit and examine the data in the PROMO_NAME and PROMO_END_DATE
columns of the promotions table, and the required output format.

Which two queries give the correct result?

View the Exhibit and examine the data in the PROMO_NAME and PROMO_END_DATE
columns of the promotions table, and the required output format.

Which two queries give the correct result?

A.
Option A

B.
Option B

C.
Option C

D.
Option D



Leave a Reply 2

Your email address will not be published. Required fields are marked *


karan

karan

C and D are the true answers.
Trim/fm (fmDay, fmdd …) = to remove the space after the End of Day or month or date
See examples:
—————————
SQL> SELECT ID, TO_CHAR(Start_Date,’Day Month DD, YYYY’) AS “Start Date” FROM Employee;

ID Start Date
—- —————————-
01 Thursday July 25, 1996
02 Sunday March 21, 1976
03 Tuesday December 12, 1978
04 Sunday October 24, 1982
05 Sunday January 15, 1984
06 Thursday July 30, 1987
07 Monday December 31, 1990
08 Tuesday September 17, 1996

8 rows selected.

SQL> –Embedded spaces can be removed by placing the “fm” prefix.
SQL>
SQL> SELECT ID, TO_CHAR(Start_Date,’fmDay Month fmDD, YYYY’) AS “Start Date” FROM Employee;

ID Start Date
—- —————————-
01 Thursday July 25, 1996
02 Sunday March 21, 1976
03 Tuesday December 12, 1978
04 Sunday October 24, 1982
05 Sunday January 15, 1984
06 Thursday July 30, 1987
07 Monday December 31, 1990
08 Tuesday September 17, 1996

8 rows selected.