sdsf

Timestamp representationCharacter conversion
TIMESTAMP(0) = '2003-12-07 11:37:58'                         CHAR(19)
TIMESTAMP(6) = '2003-12-07 11:37:58.213000'          CHAR(26)


SEL CURRENT_TIMESTAMP ;

            Current TimeStamp(6)
--------------------------------
2014-05-24 12:19:52.460000+00:00


// 366 02
SELECT  ( TIMESTAMP  '2004-10-20 10:25:40'  -  TIMESTAMP  '2003-10-20 08:25:40' )  DAY (  3 )  TO  HOUR ;

// 05/10/01
SELECT  CAST  ( TIMESTAMP  '2005-10-01 09:30:22'  AS  DATE )  ;



/**They overlap **/
SELECT  'They overlap'  WHERE
( DATE  '2004-01-01' ,  DATE  '2004-11-30' )  OVERLAPS
( DATE  '2004-10-15' ,  DATE  '2004-12-31' )  ;

/** No row returned **/
SELECT  'They overlap'  WHERE
( DATE    '2003-01-01' ,  DATE  '2003-10-15' )  OVERLAPS
( DATE    '2003-10-15' ,  DATE  '2003-12-31' )  ;



/** 2014-May-24 **/
SELECT   CURRENT_DATE  (  FORMAT   'Y4-M3-DD'  ) ;

/** 2013-Dec-31 **/
SELECT   DATE  '2013-12-31'  (  FORMAT   'yyyy-mmm-dd'  )  ;

/** 2014-05-24 **/
SELECT   CURRENT_DATE  (  FORMAT   'YYYY-MM-DD'  ) ;


/**  04:51:10 **/
SELECT   CURRENT_TIME  (  FORMAT   'HH:MI:SS'  ) ;

/**  04:51:24-08:00 **/
SELECT   CURRENT_TIME  ;

你可能感兴趣的:(BANKING)