create table t_CounsellorInfo
(
SID int not null auto_increment,
Cou_account varchar(10),
Cou_password varchar(8),
Cou_state int,
Cou_role varchar(6),
Cou_name varchar(6),
primary key(SID )
)
insert into t_CounsellorInfo(Cou_account,Cou_password ,Cou_state,Cou_role,Cou_name) values ('0000000003','66666666',1,'辅导员','王梦')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 'inser
t into t_CounsellorInfo(Cou_account,Cou_password ,Cou_state,Cou_role,Cou_na' at
line 11这是什么原因啊,没有找出错来啊(数据库用的是mysql)
(
SID int not null auto_increment,
Cou_account varchar(10),
Cou_password varchar(8),
Cou_state int,
Cou_role varchar(6),
Cou_name varchar(6),
primary key(SID )
)
insert into t_CounsellorInfo(Cou_account,Cou_password ,Cou_state,Cou_role,Cou_name) values ('0000000003','66666666',1,'辅导员','王梦')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 'inser
t into t_CounsellorInfo(Cou_account,Cou_password ,Cou_state,Cou_role,Cou_na' at
line 11这是什么原因啊,没有找出错来啊(数据库用的是mysql)
我的mysql版本是5.0.41
(
SID int not null auto_increment,
Cou_account varchar(10),
Cou_password varchar(8),
Cou_state int,
Cou_role varchar(6),
Cou_name varchar(6),
primary key(SID )
);
insert into t_CounsellorInfo(Cou_account,Cou_password ,Cou_state,Cou_role,Cou_name) values ('0000000003','66666666',1,'辅导员','王梦');
注意分号;
(
SID int not null auto_increment,
Cou_account varchar(10),
Cou_password varchar(8),
Cou_state int,
Cou_role varchar(6),
Cou_name varchar(6),
primary key(SID )
);
-- 两句用分号分隔
insert into t_CounsellorInfo(Cou_account,Cou_password ,Cou_state,Cou_role,Cou_name) values ('0000000003','66666666',1,'辅导员','王梦')
-> (
-> SID int not null auto_increment,
-> Cou_account varchar(10),
-> Cou_password varchar(8),
-> Cou_state int,
-> Cou_role varchar(6),
-> Cou_name varchar(6),
-> primary key(SID )
-> );
Query OK, 0 rows affected (0.11 sec)mysql> insert into t_CounsellorInfo(Cou_account,Cou_password ,Cou_state,Cou_role,Cou_name) values ('0000000003','66666666',1,'辅导员','王梦')
-> ;
Query OK, 1 row affected, 2 warnings (0.00 sec)