How to find Constraints on Oracle database

You need to find constraints of oracle database. Use below query for that.

SELECT *
FROM user_cons_columns
WHERE table_name = ”;

Further if you want to find more details on constraints then use below query.

SELECT *
FROM user_constraints
WHERE table_name = ”
AND constraint_name = ”;

Moreover if you are not in the default schema and using another schema then you have to use below query.


SELECT *
all_cons_columns

SELECT *
FROM all_constraints ;

Happy coding.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: