diff --git a/pkg/sql/plan/build_dml_util.go b/pkg/sql/plan/build_dml_util.go index 31ab4b053572..908a45f4214e 100644 --- a/pkg/sql/plan/build_dml_util.go +++ b/pkg/sql/plan/build_dml_util.go @@ -526,7 +526,7 @@ func buildDeletePlans(ctx CompilerContext, builder *QueryBuilder, bindCtx *BindC } for idx, col := range childTableDef.Cols { - if col.Name != catalog.Row_ID { + if col.Name != catalog.Row_ID && col.Name != catalog.CPrimaryKeyColName { if pos, ok := updateChildColPosMap[col.Name]; ok { insertColPos = append(insertColPos, pos) } else {