A
A
Alexander Ivanov2014-09-02 13:19:45
SQL
Alexander Ivanov, 2014-09-02 13:19:45

How to make a substitution of the current date, by default?

I tried this: it
date_now DATETIME() default NOW(),
gives an error.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Solomonov, 2014-09-02
@cimonlebedev

DEFAULT CURRENT_TIMESTAMP

S
Samuel_Leonardo, 2014-09-02
@Samuel_Leonardo

only timestamp can take the value of current_timestamp, there is no such feature for the datetime field

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question