1
1
drop table if exists t1;
2
create table t1 (Zeit time, Tag int not null, Monat int not null,
2
create table t1 (Tag int not null, Monat int not null,
3
3
Jahr int not null, index(Tag), index(Monat), index(Jahr) );
4
insert into t1 values ("09:26:00",16,9,1998),("09:26:00",16,9,1998);
5
SELECT CONCAT(Jahr,'-',Monat,'-',Tag,' ',Zeit) AS Date,
6
UNIX_TIMESTAMP(CONCAT(Jahr,'-',Monat,'-',Tag,' ',Zeit)) AS Unix
4
insert into t1 values (16,9,1998),(16,9,1998);
5
SELECT CONCAT(Jahr,'-',Monat,'-',Tag) AS Date,
6
UNIX_TIMESTAMP(CONCAT(Jahr,'-',Monat,'-',Tag)) AS Unix
9
1998-9-16 09:26:00 905927160
10
1998-9-16 09:26:00 905927160