LoginSignup
0
0

oracle テーブル構造を取得

Posted at

SELECT
table_name as テーブル名,
column_name カラム名,
(case
WHEN data_type = 'VARCHAR2' THEN data_type || '(' || nvl(data_precision,data_length) ||')'
WHEN data_type = 'NUMBER' THEN
data_type || '(' || nvl(data_precision,data_length) || ',' || nvl(data_scale,'0') ||')'
ELSE data_type
END
) as データテープ
,nullable 非必須
FROM
user_tab_columns
WHERE
table_name = IN_VCHR_TABLE_NAME
Order by column_id

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0