The are many questions with this same title but I can't find an answer among those.
What am I doing wrong?
CREATE TABLE J
(A integer)
;
INSERT INTO J (A)
VALUES
(1),
(2),
(3),
(4),
(5),
(6),
(7),
(8),
(9),
(10)
;
The create
alone works. The problem is just the insert. I tried in SQL Fiddle.
You can do it several ways (See SQL Fiddle with Demo):
Or (See SQL Fiddle With Demo):
Or even separate
INSERT
statements for each one:Try:
You are adding multiple values into a 1 column table.
You need
Insert into J (A) values (1);
Insert into J (A) values (2);
etc