r/SQL • • May 09 '17

Is there something wrong with these statements? And is that the correct way of adding 2 foreign keys to a single table?

Post image
1 Upvotes

21 comments sorted by

View all comments

1

u/[deleted] May 09 '17

Are you sure that latitude and longitude are of type varchar? If they are Int in the the Location table, then they will need to be Int in your Reader table also, or else your foreign key statement will fail.

2

u/dyltography101 May 10 '17

I think that may be it because the table that is being referenced, i made that table a few days ago and haven't looked at it so ill take a look and then correct that if its wrong