title: mysql create table FOREIGN key syntax
body: <ol>
  <li>I'm trying to create two tables 'ROOMS' and 'Has'</li>
  <li>ROOM contains PRIMARY KEY 'type'</li>
  <li>Has contains FOREIGN KEY `room-type' &lt;---here is the problem</li>
  </ol>
  
  <p>my sql code will not accept line 28</p>
  
  <pre><code> FOREIGN KEY(`room-type`) REFERENCES ROOM(type)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/GniIA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GniIA.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/jIAYf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jIAYf.png" alt="enter image description here"></a></p>
  
  <p>I'm completely lost as to why this won't work. It seems simple enough. Any help would me greatly appreciated.  I'm absolutely stumped.</p>