Change Case of Guest Name in SQL

Question:

Change Case of Guest Name

Write a query to display the guest name in proper case. For instance the guest name “geeta govind”  should be displayed as “Geeta Govind”. Give alias name as GUESTNAME. Sort the result based on Guest Name.

Change Case of Guest Name

Code:

Main.sql

select INITCAP(name) as GUESTNAME 
from Guest 
order by GUESTNAME;

Recommended:

Leave a Comment

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