MariaDB(or MySQL) 1093 오류 발생
아래와 같은 SQL을 실행할 때 INSERT INTO T_NAME ( ID, NAME, ORDER_NO ) VALUES ( #{id}, #{name}, ( SELECT IFNULL(MAX(ORDER_NO), 0) + 1 FROM T_NAME WHERE ID = #{id} ) ) SQL 오류 (1093): Table 'T_NAME' is specified twice, both as a target for 'INSERT' and as a separate source for data 와 같은 오류가 발생한다면 .... INSERT INTO T_NAME ( ID, NAME, ORDER_NO ) VALUES ( #{id}, #{name}, ( SELECT IFNULL(MAX(ORDER_NO), 0) + 1 FRO..
2021. 4. 19.