使用具有多连接的FROM子句更新语句 [英] Update statement with FROM clause with multi joins

查看:64
本文介绍了使用具有多连接的FROM子句更新语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

sql Update语句如何工作,同时使用带有多个连接的FROM子句[在这种情况下WHERE子句如何工作]?,



也是必要的要更新的表必须在FROM子句中吗?



请解释

解决方案

更新在你告诉它的桌子上工作。例如:



 更新 table1 
SET Field1 = ' '





将更新table1。



from子句将限制更新内容。除非您尝试加入其他表,否则不需要From子句。


还需要更新的表必须在FROM子句中吗?

how the sql Update statement work , while using FROM Clause with multiple joins[also in this situation how the WHERE clause work] ?,

also is it necessary that the table which is getting updated has to be in FROM clause ?

kindly explain

解决方案

Update works on the table you tell it to. For example:

UPDATE table1 
SET Field1 = ''



will update table1.

The from clause will limit what gets updated. You don't need a From clause unless you are trying to join in other tables.


also is it necessary that the table which is getting updated has to be in FROM clause ?


这篇关于使用具有多连接的FROM子句更新语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆