SQL Basic
SQL Advanced
SQL Functions
| SQL format() |
The FORMAT() FunctionThe FORMAT() function is used to format how a field is to be displayed. SQL FORMAT() Syntax
SQL FORMAT() ExampleWe have the following "Products" table:
Now we want to display the products and prices per today's date (with today's date displayed in the following format "YYYY-MM-DD"). We use the following SELECT statement:
The result-set will look like this:
|
SQL format()