在SQL Server 中使用DELETE和UPDATE的INNER JOIN关键字与 Access 的常规写法不同。
Access中写为:
delete from t1 inner join t2 on t1.id = t2.tid
而SQL Server中须写为:
delete from t1from t1inner 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