January 17, 2020

Understanding INSERT IGNORE in MySQL

Usually, if there is an error during the INSERT command execution, the error is thrown and the execution stopped. MySQL supports something named IGNORE along with INSERT, which captures the error as a WARNING. Consider the following CREATE TABLE ‘EmployeeDetails’ ( ‘Id’ INT(5) NOT NULL PRIMARY KEY, ‘Name’ VARCHAR(50) NOT