首页 > 数据库 >DATETIME和INTERVAL的ANSI SQL标准格式

DATETIME和INTERVAL的ANSI SQL标准格式

时间:2023-01-28 10:39:19浏览次数:30  
标签:subset format MM DD INTERVAL DATETIME ANSI

The ANSI SQL standards specify qualifiers and formats for character representations of DATETIME and INTERVAL values. The standard qualifier for a DATETIME value is YEAR TO SECOND, and the standard format is as follows:

YYYY-MM-DD HH:MM:SS

The standards for an INTERVAL value specify the following two classes of intervals:

  • The YEAR TO MONTH class has the format: YYYY-MM A subset of this format is also valid: for example, just a month interval.
  • The DAY TO FRACTION class has the format: DD HH:MM:SS.F Any subset of contiguous fields is also valid: for example, MINUTE TO FRACTION.

 



标签:subset,format,MM,DD,INTERVAL,DATETIME,ANSI
From: https://blog.51cto.com/zhjh256/6024721

相关文章