i




 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Searching for a table of column in Oracle PLSQL
04-20-2011, 04:44 AM
Post: #1
Searching for a table of column in Oracle PLSQL
i was working on a project and was wandering how can i search for a particular column or a table in Oracel PLSQL.

Here we go

Code:
SELECT * FROM USER_TAB_COL

and

Code:
SELECT * FROM USER_TAB_COLUMNS

The above queries will return information about all the columns and tables that are accessible to the user using the above query

You can search for a particular column like

Code:
SELECT * FROM USER_TAB_COL WHERE COLUMN_NAME='Column name'

You can search for a particular table in the same fashion

Code:
SELECT * FROM USER_TAB_COL WHERE TABLE_NAME='Column name'



I hope this will ease up you day-to-day activities. stay in touch for more tips Smile
Happy learning



Oracle Certified Trainer
[Image: signature.php?uid=40]
Quote
01-29-2013, 06:17 AM
Post: #2
RE: Searching for a table of column in Oracle PLSQL
SELECT * FROM USER_TAB_COLUMNS WHERE TABLE_NAME='EMP';
SELECT * FROM USER_TAB_COLUMNS WHERE COLUMN_NAME='EMPNO';
Quote




User(s) browsing this thread: 1 Guest(s)