Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (日本語) » SQL Anywhere サーバ - SQL リファレンス » システム・オブジェクト » ビュー » 互換ビュー

 

SYSTABLE 互換ビュー (旧式)

SYSTABLE ビューは、SYSTABLE システム・テーブルを提供していた古いバージョンの SQL Anywhere との互換性を保つために用意されています。ただし、以前の SYSTABLE システム・テーブルは、SYSTAB システム・ビューに対応する ISYSTAB システム・テーブルで置換されたため、SYSTAB の使用をおすすめします。

SYSTABLE ビューの各ローは、データベース内のテーブル 1 つを示します。

ビューを構成するテーブルとカラムは、以下の SQL 文で示されます。特定のテーブルまたはカラムの詳細については、以下のビュー定義にあるリンクを参照してください。

ALTER VIEW "SYS"."SYSTABLE"
  as select b.table_id,
    b.file_id,
    b.count,
    0 as first_page,
    b.commit_action as last_page,
    COALESCE(ph.root,0) as primary_root,
    b.creator,
    0 as first_ext_page,
    0 as last_ext_page,
    b.table_page_count,
    b.ext_page_count,
    b.object_id,
    b.table_name,
    b.table_type_str as table_type,
    v.view_def,
    r.remarks,
    b.replicate,
    p.existing_obj,
    p.remote_location,
    'T' as remote_objtype,
    p.srvid,
    case b.server_type
    when 1 then 'SA'
    when 2 then 'IQ'
    when 3 then 'OMNI'
    else 'INVALID'
    end as server_type,
    10 as primary_hash_limit,
    0 as page_map_start,
    s.source,
    b."encrypted"
    from SYS.SYSTAB as b
      left outer join SYS.ISYSREMARK as r on(b.object_id = r.object_id)
      left outer join SYS.ISYSSOURCE as s on(b.object_id = s.object_id)
      left outer join SYS.ISYSVIEW as v on(b.object_id = v.view_object_id)
      left outer join SYS.ISYSPROXYTAB as p on(b.object_id = p.table_object_id)
      left outer join(SYS.ISYSIDX as i left outer join SYS.ISYSPHYSIDX as ph on(i.table_id = ph.table_id 
        and i.phys_index_id = ph.phys_index_id)) on(b.table_id = i.table_id 
        and i.index_category = 1 and i.index_id = 0);
参照