Below command is used to get all the constraints defined on a table.
SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE TABLE_NAME='{TABLE_NAME}';
Example
SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE TABLE_NAME='employee';
Previous Next Home
No comments:
Post a Comment