본문 바로가기
programming/mssql

join update/delete

by hotdogya 2013. 4. 2.

대략 아래와 같이

 

update table1
 set table1.data = 'a'
from table2
where table1.id = table2.id
 and table2.seq = '100';

 

 

delete table1
from table2
where table1.id = table2.id
 and table1.seq = '100';

'programming > mssql' 카테고리의 다른 글

mssql 2008 코멘트 보기  (0) 2013.03.04
MSSQL 자동증가 컬럼 테이블 복사  (0) 2013.02.26
insert into select  (0) 2013.02.19
row 데이터 합치기  (1) 2013.01.17
SQL Server 2005의 OVER절  (0) 2012.12.24