-4
Insert Into Location 
                    ('Amman' , 'Sweleh' , 'Jordan') ,
                    ('Zarqa' , 'Hussen' , 'Jordan') ,
                    ('Jerash' , 'jenna' , 'Jordan') ,
                    ('Ajloun' , 'shajra' , 'Jordan'),
                    ('Irbid' , 'Hoson' , 'Jordan')  ;
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

3 Answers3

2

You have syntax error, you have missed VALUES keyword. If you want to omit the fieldname then try this:

INSERT INTO Location
VALUES 
      ('Amman' , 'Sweleh' , 'Jordan') ,
      ('Zarqa' , 'Hussen' , 'Jordan') ,
      ('Jerash' , 'jenna' , 'Jordan') ,
      ('Ajloun' , 'shajra' , 'Jordan'),
      ('Irbid' , 'Hoson' , 'Jordan');

Or use this format :

INSERT INTO table(column1,column2...)
VALUES (value1,value2,...),
       (value1,value2,...),
...

for more information read this mysql-insert-multiple-records

Rakesh Shetty
  • 4,548
  • 7
  • 40
  • 79
  • The syntax for inserting multiple records in SQL server (which is OP tag) happens to be the same with mySQL systax..However For precision matter it would be better if you provided a link for SQL Server – apomene Sep 05 '14 at 12:59
1

The correct syntax of an INSERT STATEMENT statement is:

insert into tableName (field1Name,...,FieldnName) values (value1,...,valuen)

Furthermore if you want to insert multipbe records in a singe query have a look at this

Community
  • 1
  • 1
apomene
  • 14,282
  • 9
  • 46
  • 72
0

Correct syntax :

insert into tableName (field1Name) values (fieldNamevalue1)
Rakesh Shetty
  • 4,548
  • 7
  • 40
  • 79
Maharshi
  • 1,178
  • 1
  • 14
  • 37