Question 6 of 32intermediate🔧 ApplyShort Answer2 marks

Write the name of the functions to perform the following operations:

(i)

To display the day like “Monday”, “Tuesday”, from the date when India got independence.

Answer

DAYNAME()

(ii)

To display the specified number of characters from a particular position of the given string.

Answer

MID() or SUBSTR()

(iii)

To display the name of the month in which you were born.

Answer

MONTHNAME()

(iv)

To display your name in capital letters.

Answer

UCASE()

Explanation

The question tests knowledge of Single Row Functions in SQL, specifically Date and String functions. For part (i), DAYNAME() function returns the name of the day from a given date. For part (ii), both MID() and SUBSTR() functions can extract a specified number of characters from a particular position in a string. For part (iii), MONTHNAME() function returns the name of the month from a given date. For part (iv), UCASE() function converts a string to uppercase letters.