vb.net - mySQL, default current timestamp not working -


im writing program in vb keep track of money code below how i'm trying create database:

create table h ( amount decimal(9, 2), reason varchar(50), comment varchar(50), list varchar(max), dateoftrans timestamp default current_timestamp ) 

however when run error

sql execution error.  executed sql statement:  create table h (   amount decimal(9, 2),   reason varchar(50),   comment varchar(50),   list varchar(max),   dateoftrans timestamp default current_timestamp  ) error source: .net sgiclient data provider  error message: defaults cannot created on columns of data type timestamp. table 'h', column 'dateoftrans'. not create constraint. see previous errors.  

i using postgres while , thought mysql updated making timestamps searched online , couldn't find anything. tried using datetime default now() saying now() isnt valid function im @ complete loss , appreciated


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -