Answer the question
In order to leave comments, you need to log in
Is UNIX_TIMESTAMP fixed within an INSERT?
Is the value of unix_timestamp constant within one (albeit huge) insert?
I did a test:
table
CREATE TABLE `test_UNIX_TIMESTAMP` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`datefrom` INT(11) NULL DEFAULT NULL,
PRIMARY KEY (`id`)
)
insert into test_UNIX_TIMESTAMP (datefrom) values
(UNIX_TIMESTAMP())
,(UNIX_TIMESTAMP())
,(UNIX_TIMESTAMP())
....много много
,(UNIX_TIMESTAMP());
select distinct(datefrom) from test_UNIX_TIMESTAMP;
select distinct(datefrom) from test_UNIX_TIMESTAMP;
Answer the question
In order to leave comments, you need to log in
Functions that return the current date or time each are evaluated only once per query at the start of query execution. This means that multiple references to a function such as NOW() within a single query always produce the same result.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question