Please note, this will only work this way for the first TIMESTAMP column in the table.
Also, if ever you update a row containing TIMESTAMP columns, the first TIMESTAMP column will automatically be updated to use the new current date/time.
I suggest hitting the user manual or Paul DuBois' 'MySQL' book for further information.
http://dev.mysql.com/doc/mysql/en/Date_and_time_types.html
Cheers,
--V
Robert Adkins wrote:
...but doesn't.
I am attempting to create a table using the following...
CREATE TABLE INVOICE (
INV_NUMBER INT PRIMARY KEY,
CUS_CODE INT NOT NULL REFERENCES CUSTOMER(CUS_CODE),
INV_DATE DATETIME DEFAULT NOW() NOT NULL,
);
I receive an error message stating that there is an error with 'NOW()'
Which doesn't make sense to me. I understand both Oracle and MS-SQL Server use a similar format for putting the date and time into a field when a new row is created. At least that is my goal.
Is there a very different method of doing this under MySQL 4.0.21?
Thanks for any assistance you may offer.
-Rob
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]