mysql 같은 테이블 값 불러와서 넣는법
lalwr
...분 소요
*insert
( SELECT * FROM ( SELECT 컬럼 FROM 테이블 WHERE ID= #{id} ) as temp )
*update
update table set column=1 where column2 IN (select column from table)
이렇게 하면 오류나지만 아래 처럼하면 사용가능
update table set column=1 where column2 IN (select * from (select column from table) as temp)
( SELECT * FROM ( SELECT 컬럼 FROM 테이블 WHERE ID= #{id} ) as temp )
*update
update table set column=1 where column2 IN (select column from table)
이렇게 하면 오류나지만 아래 처럼하면 사용가능
update table set column=1 where column2 IN (select * from (select column from table) as temp)
이전글
...
다음글
...