Question

I try to insert my data to some table's of database I have tried the following:

INSERT INTO tbl_18189 (a,b,c,d,e) VALUES ( '1', '4 B', '%', '0', '0')  
INSERT INTO tbl_3823 (a,b,c,d,e) VALUES ( '24000', '30 M', '34%', '885', '12.05')  
INSERT INTO tbl_67126 (a,b,c,d,e) VALUES ( '3.99 M', '10 B', '10%', '530', '14.41') 
INSERT INTO tbl_4247 (a,b,c,d,e) VALUES ( '1', '170 M', '%', '271', '22.77')  
INSERT INTO tbl_23838 (a,b,c,d,e) VALUES ( '320000', '400 M', '7%', '407', '6.91')

but I got

 Error creating table: 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 'INSERT INTO tbl_38232 ...

where is the problem in my code

Was it helpful?

Solution

UNION ALL joins SELECTs and you have none in your example. Remove them.

OTHER TIPS

INSERT INTO tbl_18189 (a,b,c,d,e) VALUES ( '1', '4 B', '%', '0', '0'); 
INSERT INTO tbl_3823 (a,b,c,d,e) VALUES ( '24000', '30 M', '34%', '885', '12.05');
INSERT INTO tbl_67126 (a,b,c,d,e) VALUES ( '3.99 M', '10 B', '10%', '530', '14.41'); 
INSERT INTO tbl_4247 (a,b,c,d,e) VALUES ( '1', '170 M', '%', '271', '22.77'); 
INSERT INTO tbl_23838 (a,b,c,d,e) VALUES ( '320000', '400 M', '7%', '407', '6.91');
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top