]]
Sent: Monday, September 02, 2002 9:31 PM
To: [EMAIL PROTECTED]
Subject:Re: sysdate or curdate as default date in mysql
Chugh,
Monday, September 02, 2002, 3:41:27 PM, you wrote:
CS> Can we define sysdate or curdate as default date fo
Chugh,
Monday, September 02, 2002, 3:41:27 PM, you wrote:
CS> Can we define sysdate or curdate as default date for a column of
CS> datatype 'date' while creating a table?
You can't define result of function as a default value.
Take a look at TIMESTAMP column type:
http://www.mysql.c
Dear Chugh,
> Can we define sysdate or curdate as default date for a column of
> datatype 'date' while creating a table?
The question is ambiguous:
- if a table is created with a column defined to be a TIMESTAMP data type,
then every time a row is INSERTed or UPDATEd, the current date will be
If what you are looking for is the current date to be used as date of
creation, then remain unchanged, you will have to specify sysdate as a value
during an insert. You may benefit from the timestamp datatype, which sets
itself to the current date when any DML statements (insert, update) are
perfo