我有一个MySQL表学校MySQL的插入节给出#1064错误
id dob name surname
1 03.04.2011 jj
2 14.07.1999 na
.. ............ ..
我在上表中多行数据。现在我想要做的是;使用插入条款如下填补姓列
INSERT INTO `school` (surname) VALUES
('highvision'),
('oceanof'),
('malindimetho'),
('tahdhibprima'),
('stpatricks'),
...............
('stpatricks');
注:行我插入的数目等于行数在我的表
使用上述INSERT语句,我得到出现以下错误
#1064 - 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 ..
如何插入行?
是''.........你的代码确实一部分? – Itay
假设'..............'是你想要显示的数据,你想在表格中插入很多行。你在这里粘贴的查询没有任何问题。所以我想你有一个引号'''在你的查询中缺少某个值。还要检查'surname'列是否有足够的长度来容纳您所提供的数据。 –
亲爱的,但是如果你的表已经填满了,而你想填写姓氏字段,请使用UPDATE。 –