OSQL 直接更新数据库语句

OSQL & complex update statement

@osql -E -S MY_DB_SERVER -d MY_DB_NAME -q
"EXIT(
update myTable1 
set myTable1.fld1 = r2.fld1, myTable1.updated = r2.Updated 
from (select * from myTable1 where fld1 'AAAA' and fld2 =4) as r2 where myTable1.fld2=r2.fld2 and myTable1.fld3 in (1,2,3,4,5) and myTable1.fld1='AAAA'

)";

你可能感兴趣的:(sql,SQL Server)