UPDATE 

       TB_EXAMPLEBOOK_HISTORY AS this

       INNER JOIN (

            SELECT i.dic_sub_id

                 , Min(i.example_id) AS work_id

              FROM TB_EXAMPLEBOOK_HISTORY i

             GROUP BY i.dic_sub_id

       ) b

       ON a.DIC_SUB_ID = b.dic_sub_id

   SET a.WORK_ID = b.work_id;


저작자 표시 비영리 변경 금지
신고
posted by 뚱2