Total Pageviews

2013/04/09

ALL_TAB_COLUMNS Usage

Environment 
Oracle 11g 

Problem 

Customer requests to update ACS_NO this column length from 8 to 10. But I have more than 100 tables in my system, how do I quickly get the table which have ACS_NO column? 

Solution 

Making good use of ALL_TAB_COLUMNS. ALL_TAB_COLUMNS provides by Oracle, it describes the columns of the tables, views, and clusters accessible to the current user. 

We can use this SQL statement to find out the result:



See....we can get the result easily, and start to author alter table script.



Reference : http://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_2094.htm

No comments: