IT学習サポート、オリジナルツール作成などの各種サービス
Valid CSS!

画面のドロップダウンリスト用テーブル作成
mst_name 名前マスタ
  create table orange.mst_name (
  code_type character varying(32) not null
  , type_name character varying(32)
  , code integer not null
  , code_name character varying(32)
  , primary key (code_type, code)
  );
照会1 「コード種別」と「コード」により「コード名称」を取得
    SELECT
    code_type                                   -- コード種別									
    , type_name                                 -- コード種別名称									
    , code                                      -- コード									
    , code_name                                 -- コード名称									
    FROM									
      orange.mst_name 									
    WHERE									
      code_type = 'position'                    -- コード種別 役職									
      and code = 2                              -- コード									
  
結果