0

我想从 sql server 2000 中的表中删除所有行,但是每当我想手动删除或使用查询时,它都会显示错误。在帮助选项卡中,它显示 ODBC 错误:<0s>。我的表包含一些“0”值,但它的数据类型是字符串。这就是这个错误的原因。

代码是:

stat2=conn.createStatement();
stat2.executeUpdate("Delete * from pat.dbo.PHPL");

"Key column information is insufficient or incorrect. Too many rows were affected by update"这是警告,当点击帮助时它显示:ODBC error: <0s>. An ODBC error has been generated. You might have deleted a record that has a foreign key value related to it, or you might have violated a check constraint. For details, refer to your ODBC documentation.

4

1 回答 1

2

利用

Truncate Table PHPL

我认为您有重复的身份,请检查您不允许在此列上重复。

于 2012-08-01T06:28:26.563 回答