select paix,item_code,最后一列 ,B.barcode from 表A ,( select 最后一列,LIS_BARCODE.nextval barcode from ( SELECT DISTINCT 最后一列 from(select paix,item_code,最后一列 from 表A) ) ) B where 表A.最后一列=B.最后一列