• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 807
  • Last Modified:

nothing on user_tab_cols, no access to dba_tab_cols.


Further to my previous question, i tried the comment provided.

However, i cannot find the column in the table because the captioned.
0
csjoyce
Asked:
csjoyce
1 Solution
 
schwertnerCommented:
You have to connect as the user who owns the tables which columns you would like to investigate:
SQL> connect lsmedical/lsmedical@o10f
Connected.

The correct name of the view is  user_tab_columns

SQL> descr user_tab_columns;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------
 TABLE_NAME                                NOT NULL VARCHAR2(30)
 COLUMN_NAME                               NOT NULL VARCHAR2(30)
 DATA_TYPE                                          VARCHAR2(106)
 DATA_TYPE_MOD                                      VARCHAR2(3)
 DATA_TYPE_OWNER                                    VARCHAR2(30)
 DATA_LENGTH                               NOT NULL NUMBER
 DATA_PRECISION                                     NUMBER
 DATA_SCALE                                         NUMBER
 NULLABLE                                           VARCHAR2(1)
 COLUMN_ID                                          NUMBER
 DEFAULT_LENGTH                                     NUMBER
 DATA_DEFAULT                                       LONG
 NUM_DISTINCT                                       NUMBER
 LOW_VALUE                                          RAW(32)
 HIGH_VALUE                                         RAW(32)
 DENSITY                                            NUMBER
 NUM_NULLS                                          NUMBER
 NUM_BUCKETS                                        NUMBER
 LAST_ANALYZED                                      DATE
 SAMPLE_SIZE                                        NUMBER
 CHARACTER_SET_NAME                                 VARCHAR2(44)
 CHAR_COL_DECL_LENGTH                               NUMBER
 GLOBAL_STATS                                       VARCHAR2(3)
 USER_STATS                                         VARCHAR2(3)
 AVG_COL_LEN                                        NUMBER
 CHAR_LENGTH                                        NUMBER
 CHAR_USED                                          VARCHAR2(1)
 V80_FMT_IMAGE                                      VARCHAR2(3)
 DATA_UPGRADED                                      VARCHAR2(3)
 HISTOGRAM                                          VARCHAR2(15)

SQL>

SQL> select table_name, column_name from user_tab_columns
  2  where rownum < 15;

TABLE_NAME                     COLUMN_NAME
------------------------------ ------------------------------
ADDITIONALINFO_CURRENT         IDENTIFIER
ADDITIONALINFO_CURRENT         VERSION
ADDITIONALINFO_CURRENT         DELETED
ADDITIONALINFO_CURRENT         CREATEUSER
ADDITIONALINFO_CURRENT         CREATEDATE
ADDITIONALINFO_CURRENT         CREATETIMEZONE
ADDITIONALINFO_CURRENT         CHANGEUSER
ADDITIONALINFO_CURRENT         CHANGEDATE
ADDITIONALINFO_CURRENT         CHANGETIMEZONE
ADDITIONALINFO_CURRENT         DOCUMENT
ADDITIONALINFO_CURRENT         OWNER
ADDITIONALINFO_CURRENT         TIMEOFMEASURE
ADDITIONALINFO_CURRENT         SI
ADDITIONALINFO_CURRENT         MDROLE

14 rows selected.
0
 
Pradeepgv03Commented:
Hi,
If you dont have access to the schema that owns the objects you can use All_tab_columns.

When you are given access  to other schema objects I feel this would be the right view to check out. The "all_tab_columns" also has columns similar to user_tab_columns and Dba_tab_columns.


Regards,
Pradeep George,
Oracle Certified Master.
0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now