oracle 多列=多列

oracle 多列=多列

https://www.cnblogs.com/hijushen/p/4273929.html
https://blog.csdn.net/hello__word__/article/details/88354694

多列更新

UPDATE WMS_CUSTOMER_CONFIG C
   SET (C.WORK_DESCRIPTION,
        C.S_IS_GROUP_OLD_ITEM,
        C.S_IS_GROUP_ITEM_CODE,
        C.S_IS_GROUP_LOT,
        C.S_IS_GROUP_ORDER_CODE,
        C.S_IS_GROUP_PD,
        C.S_IS_GROUP_LD) =
       (SELECT T.WORK_DESCRIPTION,
               T.S_IS_GROUP_OLD_ITEM,
               T.S_IS_GROUP_ITEM_CODE,
               T.S_IS_GROUP_LOT,
               T.S_IS_GROUP_ORDER_CODE,
               T.S_IS_GROUP_PD,
               T.S_IS_GROUP_LD
          FROM TEMP_CONFIG T
         WHERE T.ID = C.ID)
WHERE C.ID = (SELECT T.ID FROM TEMP_CONFIG T WHERE T.ID = C.ID);
WHERE EXISTS (SELECT T.ID FROM TEMP_CONFIG T WHERE T.ID = C.ID);
 
 
多列 in 条件
SELECT C.ID,
       C.S_IS_GROUP_OLD_ITEM,
       C.S_IS_GROUP_ITEM_CODE,
       C.S_IS_GROUP_LOT,
       C.S_IS_GROUP_ORDER_CODE,
       C.S_IS_GROUP_PD,
       C.S_IS_GROUP_LD
  FROM WMS_CUSTOMER_CONFIG C
WHERE (C.S_IS_GROUP_OLD_ITEM, C.S_IS_GROUP_ITEM_CODE, C.S_IS_GROUP_LOT,
        C.S_IS_GROUP_ORDER_CODE, C.S_IS_GROUP_PD, C.S_IS_GROUP_LD) IN
       (SELECT T.S_IS_GROUP_OLD_ITEM,
               T.S_IS_GROUP_ITEM_CODE,
               T.S_IS_GROUP_LOT,
               T.S_IS_GROUP_ORDER_CODE,
               T.S_IS_GROUP_PD,
               T.S_IS_GROUP_LD
          FROM TEMP_C T);

多列 = 条件 ,限制select返回仅1条记录
SELECT C.ID,
       C.S_IS_GROUP_OLD_ITEM,
       C.S_IS_GROUP_ITEM_CODE,
       C.S_IS_GROUP_LOT,
       C.S_IS_GROUP_ORDER_CODE,
       C.S_IS_GROUP_PD,
       C.S_IS_GROUP_LD
  FROM WMS_CUSTOMER_CONFIG C
WHERE (C.S_IS_GROUP_OLD_ITEM, C.S_IS_GROUP_ITEM_CODE, C.S_IS_GROUP_LOT,
        C.S_IS_GROUP_ORDER_CODE, C.S_IS_GROUP_PD, C.S_IS_GROUP_LD) =
       (SELECT T.S_IS_GROUP_OLD_ITEM,
               T.S_IS_GROUP_ITEM_CODE,
               T.S_IS_GROUP_LOT,
               T.S_IS_GROUP_ORDER_CODE,
               T.S_IS_GROUP_PD,
               T.S_IS_GROUP_LD
          FROM TEMP_C T WHERE ID=4041);

oracle 多列=多列

上一篇:MongoDB 简介 安装 使用


下一篇:ATAC-seq数据的accessibility