便利かもしれないSQL
2012年6月12日 DB仕事中使ってみて便利だったSQL。
# テーブル名称全て取得
select table_name from user_tables;
# 列名を全て取得
select column_name from user_tab_columns where table_name = ’****’;
# テーブルの項目検索
select * from user_tab_columns where column_name like ’%****%’;
資料を読み返すのが面倒な時はこれを使うと便利かも。
# テーブル名称全て取得
select table_name from user_tables;
# 列名を全て取得
select column_name from user_tab_columns where table_name = ’****’;
# テーブルの項目検索
select * from user_tab_columns where column_name like ’%****%’;
資料を読み返すのが面倒な時はこれを使うと便利かも。
コメント