CURDATE() syntax helps please

Hi all

I am trying to create a column within my pre existing table ‘property’ i want this column to represent the date the ‘job’ was ordered; so i am trying to utilise CURDATE(), although i am having major problems with the syntax and i cant see where I am going wrong. I know it will be simple, but please help.

alter table property add column date_job_rec datetime not null curdate();

my MySQl version is 5.1.47

Many thanks in advance

You can’t use a function as a default value, and I don’t know of a way to achieve what you want using a DATETIME field. You can however do it using a TIMESTAMP field, see here


never completely trust anything you don’t find on the site – in this instance, w3schools is wrong

I was lifting the idea direct from -

where they have the line:


i havent tried any other options tbh.

Have you tried using NOW() with a date/time field?