在 SQL  Server 中使用 DELETEUPDATEINNER JOIN 关键字与 Access 的常规写法不同。

Access中写为:

delete from t1 inner join t2 on t1.id = t2.tid

而SQL Server中须写为:

delete from t1 from t1 inner join t2 on t1.id = t2.tid

注意蓝线部分!

同样,Update的写法也有所有不同。

Access中:

update t1 inner join t2 on t1.id = t2.tid set t1.name='Liu'

SQL Server中:

update t1 set t1.name='Liu' from t1 inner join t2 on t1.id = t2.tid

相关文章:

  • 2022-01-24
  • 2022-02-17
  • 2022-12-23
  • 2021-05-30
  • 2022-12-23
  • 2021-07-10
  • 2022-12-23
猜你喜欢
  • 2021-12-05
  • 2021-06-04
  • 2021-07-28
  • 2022-12-23
  • 2022-03-05
相关资源
相似解决方案