Академический Документы
Профессиональный Документы
Культура Документы
A very basic CREATE TABLE statement which should work in any SQL database:
Note that beginning with MySQL 4.1 ENGINE=innodb is the preferred method of defining
the storage type.
Use SHOW CREATE TABLE (see below) to check that MySQL has created the table as you
defined it.
The column cur_timestamp is automagically updated every time the record is changed.
In this case the column created retains its initial value and is not changed during
subsequent updates.
For versions prior to 4.1, the only workaround is to create two timestamp columns in a
table, and explicitly set the second one when inserting the record. Remember: the first
TIMESTAMP will be automagically updated on each record update.