About 4,190,000 results
Open links in new tab
  1. mysql - Show all the constraints of all tables in database - Stack Overflow

    Jun 11, 2010 · Use the information_schema.key_column_usage table to get the fields in each one of those constraints: If instead you are talking about foreign key constraints, use …

  2. mysql - Show constraints on tables command - Stack Overflow

    Jul 2, 2018 · Simply query the INFORMATION_SCHEMA: COLUMN_NAME, CONSTRAINT_NAME, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME. …

  3. MySQL: how can I see ALL constraints on a table?

    The simplest way to see the explanation of a current table and its constraints is to use: SHOW CREATE TABLE mytable; This will show you exactly what SQL would be entered to define the …

  4. SQL Query to Display All the Existing Constraints on a Table

    Dec 30, 2021 · We use INFORMATION_SCHEMA.TABLE_CONSTRAINTS to display the constraints. Here, we display the name(CONSTRAINT_NAME) and the type of the …

  5. How to Display All the Existing Constraints on a Table in MySQL

    To display all the existing constraints on a specific table, you can use the following query: CONSTRAINT_NAME, CONSTRAINT_TYPE, TABLE_NAME, COLUMN_NAME, …

  6. 28.3.41 The INFORMATION_SCHEMA TABLE_CONSTRAINTS Table - MySQL

    The TABLE_CONSTRAINTS table describes which tables have constraints. The TABLE_CONSTRAINTS table has these columns: The name of the catalog to which the …

  7. 2 Ways to List CHECK Constraints in MySQL - Database.Guide

    Aug 22, 2023 · The information_schema.table_constraints view returns all constraint types. This includes UNIQUE , PRIMARY KEY , FOREIGN KEY , and CHECK constraints. So if we only …

  8. Show Constraints on Table Command in MySQL - Online …

    You can show constraints on tables with the help of SHOW command. The syntax is as follows −. show create table yourTableName; The above command will show all constraints with table …

  9. How to check constraints of a table in MySQL 8 - Sling Academy

    Jan 26, 2024 · SELECT TABLE_NAME, COLUMN_NAME, CONSTRAINT_NAME FROM information_schema.KEY_COLUMN_USAGE WHERE TABLE_SCHEMA = 'YourDatabase' …

  10. mysql - How do I see all foreign keys to a table or column?

    Oct 14, 2008 · select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS where CONSTRAINT_TYPE = 'FOREIGN KEY'; You can view all constraints by using select * from …

  11. Some results have been removed
Refresh