2009/09/04 14:32 DATABASE/MYSQL

출처 : http://darky.egloos.com/2378550

업데이트(인서트) 할때 같은 테이블명이 중복사용되서는 안된다
sub Query로 처리해야 함.
 
insert into xt_tbl (
컬럼들 .................. )
values  (
값들.....,        (select (max(seq) + 1) from xt_tbl) )

You can't specify target table 'goodsrate' for update in FROM clause



FAILcom.ibatis.common.jdbc.exception.NestedSQLException:  
--- The error occurred while applying a parameter map. 
--- Check the goodsrate.insert-InlineParameterMap. 
--- Check the statement (update failed). 
--- Cause: java.sql.SQLException: You can't specify target table 'table_name' for update in FROM clause

posted by by jadunara(Nam 경탁) 나는너의힘
 <PREV 1 ... 50 51 52 53 54 55 56 57 58 ... 185    NEXT>