Can't delete any foreign key on every query to drop foreign key

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • haji1222
    New Member
    • Dec 2012
    • 1

    Can't delete any foreign key on every query to drop foreign key

    mysql> alter table employee_salary drop foreign key empid;
    ERROR 1025 (HY000): Error on rename of '.\hjj\employee _salary' to '.\hjj\#sql2-16c-1' (errno: 152)
    plz solve this
  • PreethiGowri
    New Member
    • Oct 2012
    • 126

    #2
    check if the name of foreign key you mentioned is correct

    Comment

    • PreethiGowri
      New Member
      • Oct 2012
      • 126

      #3
      use the following query to known the name of the foreign key
      Code:
      SHOW CREATE TABLE table_name
      you can also use the constraint name rather than the column name of the foreign key

      Comment

      Working...