Search code examples
sqloracle-databaseoracle11g

ORA-00928: missing SELECT keyword when i tried to insert multiple rows in Oracle database table


I am trying to insert multiple rows in the oracle table but getting the following error

ORA-00928: missing SELECT keyword 

Following are my insert statements

INSERT ALL
      into COUNTRY ("CountryID","CountryName") values (1,'Germany')
      into COUNTRY ("CountryID","CountryName") values (2,'United Kingdom')
      into COUNTRY ("CountryID","CountryName") values (3,'United States')
      into COUNTRY ("CountryID","CountryName") values (4,'Russia')
      into COUNTRY ("CountryID","CountryName") values (5,'France')
      into COUNTRY ("CountryID","CountryName") values (6,'Pakistan')
      into COUNTRY ("CountryID","CountryName") values (7,'India')
      into COUNTRY ("CountryID","CountryName") values (8,'Brazil')
      into COUNTRY ("CountryID","CountryName") values (9,'Itly')
      into COUNTRY ("CountryID","CountryName") values (10,'Iran'),
      into COUNTRY ("CountryID","CountryName") values (11,'Austria')
SELECT 1 FROM DUAL;

Solution

  • Deleted one "coma":

    INSERT ALL
          into COUNTRY ("CountryID","CountryName") values (1,'Germany')
          into COUNTRY ("CountryID","CountryName") values (2,'United Kingdom')
          into COUNTRY ("CountryID","CountryName") values (3,'United States')
          into COUNTRY ("CountryID","CountryName") values (4,'Russia')
          into COUNTRY ("CountryID","CountryName") values (5,'France')
          into COUNTRY ("CountryID","CountryName") values (6,'Pakistan')
          into COUNTRY ("CountryID","CountryName") values (7,'India')
          into COUNTRY ("CountryID","CountryName") values (8,'Brazil')
          into COUNTRY ("CountryID","CountryName") values (9,'Itly')
          into COUNTRY ("CountryID","CountryName") values (10,'Iran')
          into COUNTRY ("CountryID","CountryName") values (11,'Austria')
    SELECT 1 FROM DUAL;