创建mysql数据库出现ERROR 1064 (42000): You have an error in your SQL syntax; check the ......问题
droptableifexistsUserTb1;createtableUserTb1(idint(11)primarykeyauto_increment,usernam...
drop table if exists UserTb1;
create table UserTb1
(
id int(11) primary key auto_increment,
username VARCHAR(20) ,
password VARCHAR(30)
);
drop table if exists EscapedPeopleTb1;
create table EscapedPeopleTb1
(
id int(11) primary key auto_increment,
name VARCHAR(20) not null,
gender VARCHAR(20),
age int(11),
IDNo VARCHAR(20),
address VARCHAR(100),
crimeRecord varchar(200),
pic VARCHAR(100)
);
drop table if exists VehicleInfoTb1;
create table VehicleInfoTb1
(
id int(11) primary key auto_increment,
name varchar(20),
idno varchar(20),
license varchar(20),
createTime varchar(30),
faultRecord varchar(300),
penalty double(18)
)
;
drop table if exists UploadFileTb1;
create table UploadFileTb1
(
id int(11) primary key auto_increment,
uploadTime VARCHAR(20),
FileDesc VARCHAR(200),
FilePath VARCHAR(100)
)
; 展开
create table UserTb1
(
id int(11) primary key auto_increment,
username VARCHAR(20) ,
password VARCHAR(30)
);
drop table if exists EscapedPeopleTb1;
create table EscapedPeopleTb1
(
id int(11) primary key auto_increment,
name VARCHAR(20) not null,
gender VARCHAR(20),
age int(11),
IDNo VARCHAR(20),
address VARCHAR(100),
crimeRecord varchar(200),
pic VARCHAR(100)
);
drop table if exists VehicleInfoTb1;
create table VehicleInfoTb1
(
id int(11) primary key auto_increment,
name varchar(20),
idno varchar(20),
license varchar(20),
createTime varchar(30),
faultRecord varchar(300),
penalty double(18)
)
;
drop table if exists UploadFileTb1;
create table UploadFileTb1
(
id int(11) primary key auto_increment,
uploadTime VARCHAR(20),
FileDesc VARCHAR(200),
FilePath VARCHAR(100)
)
; 展开
1个回答
展开全部
mysql> create table VehicleInfoTb1
-> (
-> id int(11) primary key auto_increment,
-> name varchar(20),
-> idno varchar(20),
-> license varchar(20),
-> createTime varchar(30),
-> faultRecord varchar(300),
-> penalty double(18)
-> )
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near ')
)' at line 9
double(18) 修改一下
mysql> create table VehicleInfoTb1
-> (
-> id int(11) primary key auto_increment,
-> name varchar(20),
-> idno varchar(20),
-> license varchar(20),
-> createTime varchar(30),
-> faultRecord varchar(300),
-> penalty double
-> );
Query OK, 0 rows affected (0.09 sec)
mysql>
通过.
-> (
-> id int(11) primary key auto_increment,
-> name varchar(20),
-> idno varchar(20),
-> license varchar(20),
-> createTime varchar(30),
-> faultRecord varchar(300),
-> penalty double(18)
-> )
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near ')
)' at line 9
double(18) 修改一下
mysql> create table VehicleInfoTb1
-> (
-> id int(11) primary key auto_increment,
-> name varchar(20),
-> idno varchar(20),
-> license varchar(20),
-> createTime varchar(30),
-> faultRecord varchar(300),
-> penalty double
-> );
Query OK, 0 rows affected (0.09 sec)
mysql>
通过.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询