timestamp - Why can't I use Current_timestamp as default value in mysql? -



timestamp - Why can't I use Current_timestamp as default value in mysql? -

i has mysql database set locally phpmyadmin. wanted utilize available tables in remote database, exported sql phpmyadmin , tried run on other db.

this export gave me:

create table if not exists `messages` ( `id` int(11) not null auto_increment, `title` varchar(255) not null, `message` text not null, `msgtype` varchar(10) default null, `important` int(1) not null default '0', `poster` int(5) default null, `date` timestamp not null default current_timestamp, primary key (`id`) ) engine=myisam default charset=latin1 auto_increment=37 ;

however, complains there parse error

near 'current_timestamp, primary key (id) ) engine=myisam defa".

it worked on local db, why not here? changed , how prepare it?

edit: i've tried using other functions now() or curdate() well, same problem.

from the documentation:

note in older versions of mysql (prior 4.1), properties of timestamp info type differed in several ways described in section (see mysql 3.23, 4.0, 4.1 reference manual details); these include syntax extensions deprecated in mysql 5.1, , no longer supported in mysql 5.5. has implications performing dump , restore or replicating between mysql server versions.

mysql 4.0.24 incredibly outdated, @ point - consider migrating version starts 5. :-)

mysql timestamp

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -