The Oracle data dictionary exists in the form of data views. There are two views relating to the data dictionary and columns in the database. These are called "All_Tab_Cols" and "All_Tab_Columns." The difference is that All_Tab_Cols contains all fields, including system fields. Alternatively, "All_Tab_Columns" hides system fields from queries when they are executed. All_Tab_Columns should be interrogated when only user data is required for inspection. If system data should be included, the All_Tab_Cols view should be queried.
- Skill level:
Other People Are Reading
Call sqlplus by executing the sqlplus icon on your system. This will depend on your version of Oracle and operating system as it can be run on Windows or Linux. This will display a window with the "SQL>" prompt ready to accept commands.
Type in the following command to extract all column names from the database:
select column_name from all_tab_cols;
This will list all column names in the database to be saved or viewed.
Filter your search by using a "where" clause to obtain column names by other criteria. The full list of fields in the "All_Tab_Columns" table can be obtained by entering the command:
You can then filter your results by one of the other columns in the table. For example to filter by the sales table name use:
select column_name from all_tab_cols where table_name = 'sales';
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for