两个WHERE列的SQLite3 SQL DELETE语法

时间:2017-05-03 21:09:37

标签: c++ sql sqlite

此字符串适用于一列:

delSQL = "DELETE FROM user WHERE Name='" + datArray[0] + "';";

但是对于两列看起来正确的错误:在'AND'

之前预期';'
delSQL = "DELETE FROM user WHERE Name='" + datArray[0] + "'" AND " Age=" + datArray[1] + ";"; 

建议非常感谢。

1 个答案:

答案 0 :(得分:0)

试试这个......

delSQL = "DELETE FROM user WHERE Name='" + datArray[0] + "' AND Age=" + datArray[1] + ";";