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表找不到!

  • 相关阅读:
    9.24 Django Form组件
    9.21 form 和Ajax详解
    vue生命周期
    禁止输入框复制粘贴
    【转义字符】HTML 字符实体&lt; &gt: &amp;
    dispatch emit broadcast
    删除git项目
    新建github项目,邀请成员
    git常用命令行
    echarts用法
  • 原文地址:https://www.cnblogs.com/sarahs/p/4519121.html
Copyright © 2011-2022 走看看