Issue
Currently using PHPMyAdmin, and I am trying to insert some data into a SQL Table.
The error that I am getting is Unexpected Beginning of Statement (near 'brand')
Brand is on the second line of the SQL statement.
The data that I am trying to enter:
INSERT INTO 'vehicles'
('reg_no', 'category', 'brand', 'description', 'dailyrate') VALUES
('BA5923W', 'car', 'Toyota', 'black 4 door 2.6 engine ', '9.99'),
('BA6611A', 'car', 'NISSAN ', '4 Door Saloon, Automatic', '9.99'),
('BM1245a', 'car', 'Golf', NULL, '9.00'),
('GA5955E', 'truck', 'NISSAN CABSTAR 3.0', 'Lorry, Manual ', '18.99')
cheers
Solution
You have an syntax error at you query.
For columns names you should use Grave Accent `
char like
(`reg_no`, `category`, `brand`, `description`, `dailyrate`)
and for data line Apostrophe '
char like
('BA5923W', 'car', 'Toyota', 'black 4 door 2.6 engine ', '9.99')
Answered By - uxmal
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.