I would like to see the constraints defined in a synonym of a table.
When a type
SQL> DESCRIBE table_name;
It shows me only the number of each column, the not null flag and the size. How can I know all the constraints for each column? How can I know also if the synonyms are either public or private?
Thanks, Alvaro.
SOLUTION
With @Aramillo helps and adapting it to my needs, I figure out how to do it. I want to see the Constraints defined for a table but not according to the USER. There are two options, with ALL_CONSTRAINTS and ALL_CONS_COLUMNS.
ALL_CONSTRAINTS
has not the column COLUMN_NAME in order to know the column's name which the constraints is set to. [ALL_CONS_COLUMNS]
has.
Query:
SELECT * FROM all_cons_columns WHERE table_name = 'table_name';
About the private or public synonym, as the links above say,
ALL_CONSTRAINTS/ALL_CONS_COLUMNS describes constraint definitions on tables accessible to the current user.
So I guess if it shows data either the synonym is public or you are the correct user for the private synonym.