LoginSignup
1
0

More than 5 years have passed since last update.

DBから指定カラム名を持つテーブルを部分一致検索するSQL文

Posted at

指定カラム名からテーブルを部分一致検索をできるSQL

SearchTableByColumnName.sql
SELECT TABLE_NAME,COLUMN_NAME
FROM USER_TAB_COLUMNS
WHERE COLUMN_NAME LIKE '%COLUMN_NAME%'
ORDER BY TABLE_NAME,COLUMN_NAME;

補足

'%COLUMN_NAME%'

に指定したカラム名で検索ができます。
%などを使えば部分一致検索ができます。

1
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
1
0