How do I show unique constraints of a table in MySQL?

前端 未结 5 648
庸人自扰
庸人自扰 2020-12-05 17:33

I created them, but I forgot which ones they are.

I just want to

  1. show them.
  2. remove all the constraints on a table.
5条回答
  •  無奈伤痛
    2020-12-05 17:55

    This query returns primay keys, unique keys and foreign ones :

    show indexes from table_name;
    

提交回复
热议问题