SQL update问题

来源:百度知道 编辑:UC知道 时间:2024/04/19 05:35:00
在 sql server 2000的存储过程中 写这么一个 语句
UPDATE tableName INNER JOIN another_tableName on (tableName.aa = another_tableName.aa)
set bb = 1,
cc = 2,
dd = 3;

总是报 inner 附近的语法错误
是怎回事呢?
谢谢

update tableName set bb = 1, cc = 2, dd = 3 where tableName.aa in (select another_tableName.aa from another_tableName)
这样中不?

条件不明确?
你只是把两张表格连起来
然后修改bb,cc,dd,好像没指明是哪一行