将值序列插入单列
Inserting sequence of values into single column
我需要在 table 中添加一列,如下所示:
[1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,...]
即。序列 1:5
我尝试使用此代码:
INSERT INTO table (name_of_new_column)
VALUES (1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2.....)
但我得到的是这条错误信息:
Column count doesn't match value count at row 1
我该如何解决这个问题?
正确的语法应该是:
INSERT INTO table_name (name_of_new_column)
VALUES (1),(2),(3),(4),(5)...
我需要在 table 中添加一列,如下所示:
[1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,...]
即。序列 1:5
我尝试使用此代码:
INSERT INTO table (name_of_new_column)
VALUES (1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2.....)
但我得到的是这条错误信息:
Column count doesn't match value count at row 1
我该如何解决这个问题?
正确的语法应该是:
INSERT INTO table_name (name_of_new_column)
VALUES (1),(2),(3),(4),(5)...