zoukankan      html  css  js  c++  java
  • informix中有无dual表,希望一次查询中 多个子查询 不同的不关联的多张表

    informix中有无dual表为提高IO效率,希望一次查询中 多个子查询 不同的不关联的多张表

    select 
    (select a from table1 where ****),
    (select b from table2 where ****),
    (select c from table3 where ****)
    from dual;

    可是貌似informix中没有dual表!

    在网上搜索了一下
    select 
    (select a from table1 where ****),
    (select b from table2 where ****),
    (select c from table3 where ****)
    from sysmaster:sysshmvals;

    例如:select 
    (select policyno from dm_plc_policy where rowid=258),
    (select startdate from dm_nd_plc_policy where rowid=27027201)
    from sysmaster:sysshmvals

    (注:条件中不能返回多行数据,只能返回一行数据:如rowid<100,则会报错。出现
    A subquery has returned not exactly one row.错误。)
    这样可以实现

    但是 还有别的方法吗
    另:

    sysmaster:sysshmvals 这个代表什么意思啊!!????
    需要什么权限才能用啊!????

    ------解决方案--------------------



    from systables where tid =1


    ------解决方案--------------------
    1、你可以通过以下SQL命令获得精确的最近一次数据库启动时间:
       select dbinfo("utc_to_datetime", sh_pfclrtime) from sysmaster:sysshmvals
       sysshmvals表记录数据库最近一次启动的信息!

    2、dual表找不到!

  • 相关阅读:
    矩阵树(Matrix-Tree)定理精华
    【面试题flex】关于弹性盒子中 flex: 0 1 auto 的一系列问题
    纯函数-Javascript
    uniapp 低功耗蓝牙使用(经典蓝牙用native.js)
    uniapp截屏
    unicloud数据聚合处理
    uniapp的post请求失效问题
    unicloud链表查询
    uni-id的使用
    坐标转换
  • 原文地址:https://www.cnblogs.com/sarahs/p/4519121.html
Copyright © 2011-2022 走看看