티스토리 뷰

공부

[Oracle] Update & Delete by Join Table

승가비 2020. 1. 18. 18:41
728x90
UPDATE A
SET value = (
	SELECT value
	FROM B
	WHERE B.id = A.id
);


DELETE FROM A
WHERE EXISTS (
	SELECT 1
	FROM B
	WHERE A.id = B.id
);

 

[출처] https://tora-it-kingdom.tistory.com/10

728x90

'공부' 카테고리의 다른 글

[Algorithm] Swap by 3 XOR  (0) 2020.01.18
[Oracle] Alter Table  (0) 2020.01.18
[Spring] @Async & @AOP  (0) 2020.01.18
[HDFS] Export & Import  (0) 2020.01.18
[Python] Filter dict  (0) 2020.01.18
댓글