cmd.CommandText = "DELETE FROM Table_Group0 WHERE 编号=(编号) " + "VALUES (" + t + ") ";
抛出“Incorrect syntax near the keyword 'VALUES'.”错误。
cmd.CommandText = " DELETE FROM Table_Group0 WHERE 编号= " + t + " ";
这么写就能正常执行。
第一句到底哪出错了呢?
谢谢大家。
...全文
1015打赏收藏
关于数据库删除语句写法的问题
cmd.CommandText = "DELETE FROM Table_Group0 WHERE 编号=(编号) " + "VALUES (" + t + ") "; 抛出“Incorrect syntax near the keyword 'VALUES'.”错误。 cmd.CommandText = " DELETE FROM Table_Group0 WHERE 编号= " + t + " "; 这么写就能正常执行。 第一句到底哪出错了呢? 谢谢大家。