PGoCareerGoCareer prep tools
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

SQL · Theory

INSERT IGNORE

← All stacks

Theory

38/439

INSERT IGNORE

INSERT IGNORE INTO students … skips rows that would error (duplicate key, some data issues) and continues. You don’t get a hard fail. Useful for loading a file with a few duplicates.

You also won’t notice real problems. Check ROW_COUNT() / warnings. Prefer fixing duplicates over IGNORE in app code.

Trap — INSERT IGNORE hiding NOT NULL / type errors you should fix.

On the example next to this theory — INSERT IGNORE — iNSERT adds rows. List columns explicitly for clarity.

Exam tip

INSERT IGNORE skips duplicate-key rows. Don’t hide bugs with it.

INSERT IGNORE — sample query

CREATE TABLE products (id INTEGER PRIMARY KEY, name TEXT, price REAL);
INSERT INTO products (id, name, price) VALUES
  (1, 'Mouse', 499),
  (2, 'Keyboard', 999);
SELECT * FROM products;

INSERT IGNORE — iNSERT adds rows. List columns explicitly for clarity.

Short notes

  • DefINSERT IGNORE skips offending rows instead of aborting.
  • RuleOK for dirty loads. Bad as everyday app logic.
  • TrapSwallowing real errors.

Questions

1

What does INSERT IGNORE do?

38 / 439

P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.