Tuesday, August 11, 2015

MySQL: how can I see ALL constraints on a table and database

select * from information_schema.table_constraints
where table_name='honni';





select column_name, constraint_name, referenced_column_name, referenced_table_name
from information_schema.key_column_usage
where table_name = 'table to be checked';



select *
from information_schema.table_constraints
where constraint_schema = 'honnikery'


No comments:

Post a Comment