create table doc_list (
Serial_no int auto_increment,
First_name varchar (50),
last_name varchar (50),
speciality varchar (50),
address varchar (100),
area varchar (50),
phone_no int (15),
email varchar(100),
primary key(serial_no)
);
insert into doc_list (Serial_no, First_name, last_name, speciality, address, area, phone_no)
values ("Abha", "gupta", "Gynaecology", "B-16 Mathur Vaishya Nagar Tonk Road", "Pratap Nagar", 9829133773);
我收到此错误消息: 列数与第1行的值计数不匹配 我不想在本专栏的这个电子邮件部分输入任何内容,所以我该怎么办?
答案 0 :(得分:2)
应该是
insert into
doc_list
(First_name, last_name, speciality, address, area, phone_no)
values
("Abha", "gupta", "Gynaecology", "B-16 Mathur Vaishya Nagar Tonk Road", "Pratap Nagar", 9829133773);
您不能在insert语句中包含自动递增列。
答案 1 :(得分:0)
您的查询中遗漏了Serial_no
insert into doc_list (Serial_no, First_name, last_name, speciality, address, area, phone_no)
values ("Abha", "gupta", "Gynaecology", "B-16 Mathur Vaishya Nagar Tonk Road", "Pratap Nagar", 9829133773);
所以在查询中写下它的值,以便查询工作