1
選擇命令我有三個表如何更新命令
table t1;
Sid sValue
1 abc
2 bcd
table t2
Sid Pid Mid
1 a 9
2 a 10
3 b 9
table t3
Mid MValue
9 ZZZZ
10 yyyy
我想更新表「T1」和 集t1.sVal =「」其中t2.Pid =「a」和T3。 MValue = 'ZZZZ'
我怎麼能做到這一點請幫助我在此先感謝
我已經嘗試過了類似
update t1 set sVal="" where Sid=(select Sid from t2 where Pid='a' and Mid=(select Mid from t3 where MVale='ZZZZ'))
但它不工作,並投擲攻擊錯誤 像
An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Add a name or single space as the alias name.
喔......用於校正和簡單的答案謝謝 – sanu