Inserting Data

REPLACE INTO city (
    ID, Name, CountryCode, District, Population) 
VALUES (
    1'Kabul''AFG''Kabol'4877020);


The REPLACE INTO SQL command inserts a new row or updates an existing one. 

If the specified primary key is missing, a new row is added to the table. If an existing primary key is specified, the row is updated.

If no primary key is defined for the table, the query works similarly to INSERT.