Why does this MySQL query give "error 1136" when inserting values into table [closed]
Query:
INSERT INTO Customer2
VALUES (1, 'Mrs','Ji开发者_开发技巧ll','Hill','2 Step St','Hillington','Uxbridge',
'Middx''UB10 8XY','020 8999 684') ;
From the little details you gave, this is how that query should look like:
INSERT INTO Customer2 VALUES (1, 'Mrs','Jill','Hill','2 Step St','Hillington','Uxbridge','Middx','UB10 8XY','020 8999 684') ;
You're missing a comma between Middx and UB10
You are missing a comma between
'Middx''UB10 8XY'
^
When MySql finds two strings separated by nothing or whitespace it concatenates them.
This decreases the number of values in your values
list by 1
resulting in 1136
error.
You can see a demo here.
精彩评论