Answer the question
In order to leave comments, you need to log in
How to change unix time in a column with step +1 from the previous line?
It was necessary to change the "date/time" values so that in each subsequent line they differed from the previous line by a random one from 4 hours to two days. The value of the first line is set.
Tell me how to implement it?
Answer the question
In order to leave comments, you need to log in
in each subsequent line differed from the previous line
// устанавливаем стартовую дату
SET @dt := TIMESTAMP('2017-01-01');
// обновляем данные
UPDATE tablename SET fieldname = (select @dt:= @dt + INTERVAL 1 DAY);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question