Reputation: 369
I'm in need of a little bit of help. I know you can view constraints of 1 table at one time using the SQL Command function in the Oracle Apex Application Express 4.0.2.00.07. I want to know How I can modify the command below to view Constraints of my other tables as well within the same command. Is this possible? (e.g tblOrder, tblProduct
)
SELECT constraint_name,
constraint_type
FROM USER_CONSTRAINTS
WHERE table_name = 'tblCustomer';
If you can help I'd really appreciate it.
Upvotes: 0
Views: 2409
Reputation: 180887
You can either just use IN
, listing the tables;
SELECT table_name, constraint_name, constraint_type
FROM USER_CONSTRAINTS
WHERE table_name IN ('tblCustomer', 'tblOrder', 'tblProduct')
...or since USER_CONSTRAINTS holds just the current user's tables, just plain list all constraints for all tables owned by the user by removing the WHERE
entirely;
SELECT table_name, constraint_name, constraint_type
FROM USER_CONSTRAINTS
Upvotes: 1
Reputation: 33381
SELECT constraint_name, constraint_type
FROM USER_CONSTRAINTS
WHERE table_name IN ('tblOrder', 'tblProduct','tblCustomer');
Upvotes: 1