私は次のSQLステートメントを試しています:
create table sample (
id int not null primary key auto_increment,
name varchar(100),
date_modified timestamp not null default current_timestamp on update current_timestamp,
date_created timestamp not null default now()
)
動作していません...次のエラーが発生します:
#1293 - Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
2つの日付スタンプを追跡する必要があります。1つは行が作成された日付用で、もう1つは行が最後に変更された日付用です。どちらも私が単独で使用したいことを実行しますが、MySQLではそれらを1つのテーブルに結合することはできません。
助けてください。:)