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

前端 未结 5 653
庸人自扰
庸人自扰 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 18:19

    select distinct CONSTRAINT_NAME
    from information_schema.TABLE_CONSTRAINTS
    where CONSTRAINT_SCHEMA = 'mysql'
    

提交回复
热议问题