0
我需要一些幫助來創建更新查詢。比如我有SQL更新2個表中的1個表
select:(T1- table 1, T2- tables 2, Z1 -column from table 1, Z2 Column from table 2 etc)
Select * from T1,T2 where X1=X2 and Y1=Y2 and Z1=Z2 and Datea>=20160601 and Dateb<20160720 and B1=2 and C1=5 and D1=10 and E2 in (A+,A-, 22,33,44)
現在我想寫它使用參數
from where
update T1 set F1, G1 where
如何編寫正確的條件的update
?
你可以在你的更新中執行子查詢嗎? – mfredy
例如:UPDATE TABLENAME SET F1 =(SELECT * FROM) – mfredy
對不起,我寫錯了。更新應該像更新T1設置F1 = 10,G1 = 50其中 – KrzK