home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2003 May (DVD) / Macworld Resource DVD May 2003.toast / Data / Software / Bonus / Database / mysql-max-3.23.55.sit / mysql-max-3.23.55-apple-darwi.1 / mysql-test / t / func_timestamp.test < prev    next >
Encoding:
Text File  |  2003-01-21  |  442 b   |  13 lines  |  [TEXT/ttxt]

  1. #
  2. # Tests that depend on the timestamp and the TZ variable
  3. #
  4.  
  5. drop table if exists t1;
  6. create table t1 (Zeit time, Tag tinyint not null, Monat tinyint not null,
  7. Jahr smallint not null, index(Tag), index(Monat), index(Jahr) );
  8. insert into t1 values ("09:26:00",16,9,1998),("09:26:00",16,9,1998);
  9. SELECT CONCAT(Jahr,'-',Monat,'-',Tag,' ',Zeit) AS Date,
  10.    UNIX_TIMESTAMP(CONCAT(Jahr,'-',Monat,'-',Tag,' ',Zeit)) AS Unix
  11. FROM t1;
  12. drop table t1;
  13.