zoukankan      html  css  js  c++  java
  • 临时表的使用及minus运算

    ----Oracle minus差运算: 打不开的网站=================================
    --
    创建会话临时表
    drop table YKY_Website_No;
    create global temporary table YKY_Website_No
    (
      Website_No 
    varchar2(10)
    on Commit Preserve Rows;

    insert into YKY_Website_No(Website_No)values('FM37');
    insert into YKY_Website_No(Website_No)values('FM38');
    insert into YKY_Website_No(Website_No)values('FM39');
    insert into YKY_Website_No(Website_No)values('FM41');
    insert into YKY_Website_No(Website_No)values('FM42');
    insert into YKY_Website_No(Website_No)values('FM43');
    insert into YKY_Website_No(Website_No)values('FM44');
    insert into YKY_Website_No(Website_No)values('FM45');
    insert into YKY_Website_No(Website_No)values('FM46');
    insert into YKY_Website_No(Website_No)values('FM48');
    insert into YKY_Website_No(Website_No)values('FM49');
    insert into YKY_Website_No(Website_No)values('FM50');
    insert into YKY_Website_No(Website_No)values('FM51');
    insert into YKY_Website_No(Website_No)values('FM52');
    insert into YKY_Website_No(Website_No)values('FM107');
    insert into YKY_Website_No(Website_No)values('FM108');
    insert into YKY_Website_No(Website_No)values('FM109');
    insert into YKY_Website_No(Website_No)values('FM110');
    insert into YKY_Website_No(Website_No)values('FM111');
    insert into YKY_Website_No(Website_No)values('FM112');
    insert into YKY_Website_No(Website_No)values('FM121');
    insert into YKY_Website_No(Website_No)values('NW35');
    insert into YKY_Website_No(Website_No)values('NW36');
    insert into YKY_Website_No(Website_No)values('NW37');
    insert into YKY_Website_No(Website_No)values('NW38');
    insert into YKY_Website_No(Website_No)values('NW39');
    insert into YKY_Website_No(Website_No)values('NW40');
    insert into YKY_Website_No(Website_No)values('NW41');
    insert into YKY_Website_No(Website_No)values('NW42');
    insert into YKY_Website_No(Website_No)values('NW43');
    insert into YKY_Website_No(Website_No)values('BG9');
    insert into YKY_Website_No(Website_No)values('BG10');
    insert into YKY_Website_No(Website_No)values('BG11');
    insert into YKY_Website_No(Website_No)values('BG12');
    --Minus运算得到打不开的网站编号
    select Website_No from YKY_Website_No
    minus
    select Website_No from article_detail where 
    website_no 
    in ('FM37','FM38','FM39','FM41','FM42','FM43','FM44','FM45','FM46',
    'FM48','FM49','FM50','FM51','FM52','FM107','FM108','FM109','FM110','FM111','FM112','FM121',
    'NW35','NW36','NW37','NW38','NW39','NW40','NW41','NW42','NW43',
    'BG9','BG10','BG11','BG12'
    )
    group by website_no having count(*)>0
    order by Website_No;
  • 相关阅读:
    如何理解 Dictionary Entity Type的作用 !
    Compiere去掉参考下的"显示翻译"
    Compiere去掉菜单中的"脚本""编辑器"
    Compiere去掉选择中的选择下的"用户界面设置""角色"两个按钮
    改变compiere界面
    Compiere a script to remove a client
    Compiere 制造模块
    Compiere去掉启动时的下面显示的进度条
    Compiere修改数据库连接对话窗的图像
    NHibernate Contrib Best Practice
  • 原文地址:https://www.cnblogs.com/krisy/p/1645022.html
Copyright © 2011-2022 走看看