2

I'm entering code into MySQL, but the foreign keys are showing up as "MUL". Are they still foreign keys?

Chris Forrence
  • 10,042
  • 11
  • 48
  • 64
  • Just to clarify, what language do you speak (I ask to confirm if MUL is, in fact, NULL) – Chris Forrence Nov 14 '16 at 22:19
  • I speak English Chris. And yes to comfirm, it says MUL where it should say FK for Foreign Key – Hannah James Nov 14 '16 at 22:30
  • OK, that's important. It had sounded like the _rows_ were showing MUL, but if it's the column description is showing MUL, then that's something else. Out of curiousity, what storage engine are you using? MySIAM, InnoDB? You can check by running `SHOW CREATE TABLE {table_name}` – Chris Forrence Nov 14 '16 at 22:35
  • 2
    maybe this can help: http://stackoverflow.com/questions/5317889/sql-keys-mul-vs-pri-vs-uni – McNets Nov 14 '16 at 22:35
  • Thanks for your help. Ive read through the post but it still doesnt clearly suggest that the MUL is the Foreign? – Hannah James Nov 14 '16 at 22:39
  • Check out the most upvoted answer, it clearly answers your question. – Shadow Nov 14 '16 at 22:51
  • @Shadow which user wrote it? Also not to be obtuse but there is also [link](https://premaseem.wordpress.com/2013/05/14/what-does-mul-mean-in-mysql-for-the-key/) – Drew Nov 14 '16 at 23:00
  • 1
    Omg I've never been so frustrated in my life. All that post says is that it isn't a primary or unique key... but that doesn't necessarily mean that it's a foreign key right. I need to know is it a foreign key – Hannah James Nov 15 '16 at 00:27
  • Hannah, did you run the SHOW CREATE TABLE statement that I had suggested? It would show if that column is a foreign key. – Chris Forrence Nov 15 '16 at 15:41

0 Answers0