我是sql新手。我在写基于数据的查询
如何编写查询以更新行;我想遵循这种格式;
UPDATE `reports_attributes`
(`ConID`,`CheckServices`,`Attribute1`,`Attribute2`,`Attribute3`,`Attribute4`,`Attribute5`,`Attribute6`,`Attribute7`,`Attribute8`)
VALUES ('78','Execute Summary','criminality','color1','education','color5','employment_check_2','color7','report_status','color9')
WHERE ConID=78 AND ReportType='interim_report'
最佳答案
更新语句的语法不同于插入。
UPDATE reports_attributes
Set
ConID='78',
CheckServices='Execute Summary',
Attribute1='criminality',
Attribute2='color1',
Attribute3='education',
Attribute4='color5',
Attribute5='employment_check_2',
Attribute6='color7',
Attribute7='report_status',
Attribute8='color9'
WHERE ConID=78 AND ReportType='interim_report'