End-User Documentation

QL0050 INSERT Column/Value Mismatch

QL0050 INSERT Column/Value Mismatch

The number of columns listed in an INSERT does not match the number of supplied values.

When It Appears

  • Single-row and multi-row insert statements can trigger this mismatch
  • Some malformed cases may also surface as QL0001 if the SQL is too broken to analyze cleanly

Example

var insert = new SqlInsert("INSERT INTO dbo.orders (customer_id, status) VALUES (@CustomerId)");
Assert.Contains(insert.Errors, issue => issue.Code == "QL0050");

Quick Checks

  • Align the column list and each values tuple
  • Reduce large inserts to one tuple while debugging