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();
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 http://dev.mysql.com/doc/refman/5.0/en/timestamp.html