SQL Server 

Listed here are the additional SQL Server date and time data types:

  • DATETIME2: This data type in SQL Server is very similar to DATETIME, in that it holds a date with a time of day based on the 24-hour clock, but DATETIME2 allows a larger date range and larger default fractional precision for seconds. The date range for this type is 0001-01-01 through 9999-12-31, and the time range is 00:00:00 through 23:59:59.9999999. In MySQL, use DATETIME for this data type. 
  • SMALLDATETIME: This data type in SQL Server is similar to DATETIME, in that it holds a date with a time of day based on the 24-hour clock, but SMALLDATETIME doesn't allow fractional seconds. The date range for this type is 1900-01-01 through 2079-06-06, and the time range is 00:00:00 through 23:59:59. If you don't need fractional seconds stored, then you can save storage space when using this data type versus DATETIME or DATETIME2In MySQL, use DATETIME for this data type. 
  • DATETIMEOFFSET: This data type in SQL Server is similar to DATETIME, in that it holds a date with a time of day based on the 24-hour clock, but DATETIME2 has time zone awareness, allowing you to store data that preserves the local time zone time. The time zone offset allows you to specify how much the date/time differs from UTC. The date range for this type is 0001-01-01 through 9999-12-31, and the time range is 00:00:00 through 23:59:59.9999999, with a time zone offset range of -14:00 through +14:00MySQL doesn't allow time zone awareness with data types, so you will need to store the date in the DATETIME field without time zone information. 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.167.114