GreatB 2013. 2. 6. 16:11
SMALL
merge 
 into unitofmeasure_user
using dual
  on (
      unitofmeasureid = :unitOfMeasureId AND 
      userid = :userId
     )
when matched 
then update 
        set active = 1
when not matched
then insert (unitofmeasureid, userid) 
       values (:unitOfMeasureId, :userId);
이 쿼리를 보니 참 재밌다.
공부좀 해야겠다. 
stackoverflow.com
-Nicholas Krasnov 
LIST