DBMS/mssql

[update] - update 구분에 select, from, where 사용하기

짱가쟁이 2012. 2. 24. 14:01

update A set

    value = '6'

from

table A,

    (select state, type from table where id = 231) B

where 

A.state = B.state

and A.type = B.type


업데이트 구문이 지랄 맞기는 하지만 서두 저 따위로 사용할 필요성이 있다. 쩌ㅃ~