50.8k views
5 votes
Write a SELECT statement without a FROM clause that uses the NOW function to create a row with these columns: today_unformatted The NOW function unformatted today_formatted The NOW function in this format: DD-Mon-YYYY This displays a number for the day, an abbreviation for the month, and a four-digit year.

1 Answer

2 votes

Answer:

SELECT

NOW() AS 'today_unformatted',

DATE_FORMAT(NOW(), '%d-%b-%Y') AS 'today_formatted';

Step-by-step explanation:

%d represents date.

%b represents month.

%Y represents year.

User Joe T
by
5.0k points