谁能纠正下面 SQL 代码中的这个错误?

Can anyone please rectify this error in the below SQL code?

create database android_api /** Creating Database **/

use android_api /** Selecting Database **/

create table users(
   id int(11) primary key auto_increment,
   unique_id varchar(23) not null unique,
   name varchar(50) not null,
   email varchar(100) not null unique,
   encrypted_password varchar(80) not null,
   salt varchar(10) not null,
   created_at datetime,
   updated_at datetime null
); /** Creating Users Table **/

我 运行 它在 MySQL 5.5

添加“;”

create database android_api; /** Creating Database **/
use android_api; /** Selecting Database **/
create table users(
   id int(11) primary key auto_increment,
   unique_id varchar(23) not null unique,
   name varchar(50) not null,
   email varchar(100) not null unique,
   encrypted_password varchar(80) not null,
   salt varchar(10) not null,
   created_at datetime,
   updated_at datetime null
); /** Creating Users Table **/

从您的查询中删除 auto_increament 然后 运行 它。 作为参考,请转到此 link 和 运行 您的查询....

http://www.w3schools.com/sql/trysql.asp?filename=trysql_delete