MySQL: Set default value for a Datetime Column

In this post, I provide a small demo to set default value for a Datatime column in MySQL.

I know this very basic topic and nothing special about this, but I am writing here because this is one of the most questioned by MySQL Beginner.
I always try to target all kind of database professional.

Following is a small demonstration of this.
First, Create table with default:

Second, Insert a test record:

Check the result:

Anvesh Patel

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz