mysql syntax error 1064 (42000) -


i have standard lamp configuration (apache2, mysql, php5), running on ubuntu, , i'm typing mysql commands terminal. i'm logged mysql command line root. far i've created new database, trouble started.

i'm trying create simple table getting mysql syntax error , can't figure out i'm doing wrong.

this error:

error 1064 (42000): have error in sql syntax; check manual corresponds mysql server version right syntax use near ')' @ line 10 

and query:

create table if not exists `customers` (   `uid` int(11) not null auto_increment primary key,   `name` varchar(50) not null,   `email` varchar(50) not null,   `phone` varchar(100) not null,   `password` varchar(200) not null,   `address` varchar(50) not null,   `city` varchar(50) not null,   `created` datetime not null default timestamp ); 

no idea what's wrong honestly.

you can assign default value current_timestamp not timestamp

create table if not exists `customers` (   `uid` int(11) not null auto_increment primary key,   `name` varchar(50) not null,   `email` varchar(50) not null,   `phone` varchar(100) not null,   `password` varchar(200) not null,   `address` varchar(50) not null,   `city` varchar(50) not null,   `created` timestamp not null default current_timestamp ); 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -