Sql time format

This article is tagged with: Sql time format and mysql

sql time format

DATE - format YYYY-MM-DD
DATETIME - format: YYYY-MM-DD HH:MI:SS
TIMESTAMP - format: YYYY-MM-DD HH:MI:SS
YEAR - format YYYY or YY

sql format

select [all/distinct] <col1>, <col2>, <col3>
from <table_name>
[join <join_condition>]
[where <condition>]
[group by <column_name>]
[having <search_condition>]
[order by <sort_specification>]
/*
Specifically for SQL -> Oracle
LEGEND:
[...] : optional entries
<...> : your specific entry
*/</sort_specification></search_condition></column_name></condition></join_condition></table_name></col3></col2></col1>

sql date format

SELECT DATE_FORMAT("2017-06-15", "%Y");

This article is tagged with: Sql time format and mysql