2023-10-13 11:15:14 +02:00
|
|
|
select timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456') as exp;
|
|
|
|
exp
|
2016-02-04 12:51:57 +01:00
|
|
|
31622400123456
|
2023-10-13 11:15:14 +02:00
|
|
|
explain extended select timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456') as exp;
|
2016-02-04 12:51:57 +01:00
|
|
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
|
|
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
|
|
Warnings:
|
2023-10-13 11:15:14 +02:00
|
|
|
Note 1003 select timestampdiff(MICROSECOND,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456') AS `exp`
|
|
|
|
create view v1 as select timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456') as exp;
|
2016-02-04 12:51:57 +01:00
|
|
|
select * from v1;
|
2023-10-13 11:15:14 +02:00
|
|
|
exp
|
2016-02-04 12:51:57 +01:00
|
|
|
31622400123456
|
|
|
|
drop view v1;
|