insert into fees (name, salary)
values ('john', 155), ('katy', 300);
This sometimes throws an error
missing right parenthesis
sometimes it is
SQL statement not properly ended
if I use double quotes for name entries... What's the issue?
insert into fees (name, salary)
values ('john', 155), ('katy', 300);
This sometimes throws an error
missing right parenthesis
sometimes it is
SQL statement not properly ended
if I use double quotes for name entries... What's the issue?
It would probably be easier to have multiple sql statements. For example:
INSERT INTO fees(name, salary) VALUES ('john', 155);
INSERT INTO fees(name, salary) VALUES ('katy', 300);
However, if you want to use the multiple-inserts-in-one-statement, you can have a look at https://stackoverflow.com/a/452882/651174, and do something like this:
INSERT INTO fees(name, salary) VALUES ('john', 155), ('katy', 300);
What are you using to do the SQL insert if you're running into string-formatting issues?
TRY This
INSERT INTO fees(name, salary) VALUES
('john', 155),
('katy', 300);
Go to the below link for further information
You can use UNION or UNION ALL
INSERT INTO fees(name, salary)
select 'john', 155
union all
select 'katy', 300