Database «Airport» page 2 |
|||||||||||
Such question is quite often asked: "Why the Trip table has the day of 1900-01-01 in departure/arrival dates?" According to the description of a subject area, Trip table contains only the time of departure/arrival, not the days, because flights are being carried out daily. Presence of date have been caused by the absence in early versions of A database management system (DBMS) by Microsoft Corporation. SQL(Structured Query Language) is a database computer language designed for the retrieval and management of data in relational database management systems (RDBMS), database schema creation and modification, and database object access control management.SQL Server of separate data types for date (DATE) and time (TIME) which have appeared only in version 2008. Therefore DATETIME data type corresponding to standard TIMESTAMP and including all components of time stamp was used. As for specific date of 1900-01-01, this date corresponds to an starting point of counting time, i.e. zero. Execute query:
I.e. if you insert into a column of DATETIME data type only time, date of this value becomes 1900-01-01. You can convince yourself in it by doing explicit type conversion of time value to DATETIME data type, for example:
|