phpmyadmin - MySQL "You have an error in your SQL syntax" error -


my error:

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

what error , solution?

create table login( user_name varchar(10) not null default", password varchar(10) not 'null default", email varchar(30) not null default", account_type varchar(10) not null default", ic int(10) not null default", telephone_no int(20) not null default", pin int(20) not null default", gender varchar(10) not null default", shipping_address varchar(100) not null default", city varchar(10)  not null default", state varchar(10) not null default", country varchar(10) not null default", zip_code int(10) not null default", credit_type varchar(10) not null default", credit_number int(20) not null default", cvv2 int(3) not null default", );  

mssql developer here (so not sure how can toy rdbms) reading error message have , before );.

further, seems you've got ' on third line, , syntax you're using default doesn't make sense (let alone empty strings you're setting int columns).

perhaps:

create table login   (      user_name        varchar(10) not null default '',      password         varchar(10) not null default '',      email            varchar(30) not null default '',      account_type     varchar(10) not null default '',      ic               int(10) not null default 0,      telephone_no     int(20) not null default 0,      pin              int(20) not null default 0,      gender           varchar(10) not null default '',      shipping_address varchar(100) not null default '',      city             varchar(10) not null default '',      state            varchar(10) not null default '',      country          varchar(10) not null default '',      zip_code         int(10) not null default 0,      credit_type      varchar(10) not null default '',      credit_number    int(20) not null default 0,      cvv2             int(3) not null default 0   );  

personally concerned asking question has field called credit_number , password field that's not matched salt field, nor password long enough sha1 hash.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -