Monday, 10 October 2011

SQL- Scalar Functions- FORMAT()

nThe FORMAT() function is used to format how a field is to be displayed.
Syntax:
SELECT FORMAT(column_name,format) FROM table_name
Query:
SELECT EMPname, salary, FORMAT(NOW() ,'YYYY-MM-DD‘) AS PERDATE FROM EMPtbl1

No comments:

Post a Comment