121k views
5 votes
What is DATE data type and its syntax and what is TIMESTAMP data type and its syntax in SQL language.Explain the difference between both of them .

1 Answer

1 vote

Answer: The DATE datatype give us the particular date whereas TIMESTAMP gives us the date as well as the time as the particular moment.

Step-by-step explanation:

DATE datatype gives us the date in the format yyyy-mm-dd. The timestamp format is yyyy-mm-dd hh:mm:ss. time stamp are of two types :

timestamp with time zone and timestamp without time zone.

Date is the date on that particular day whereas the timestamp is the date along with the specific time when the query is executed.

User Malay
by
6.3k points