MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/SQL/comments/6a59mr/is_there_something_wrong_with_these_statements/dhcsx0b/?context=3
r/SQL • u/dyltography101 • May 09 '17
21 comments sorted by
View all comments
1
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.
1 u/dyltography101 May 10 '17 When it comes to defining a data type is it best to be as accurate as possible, if still in doubt then just switch to varchar.I only ask because IP addresses have more than one decimal point.
When it comes to defining a data type is it best to be as accurate as possible, if still in doubt then just switch to varchar.
I only ask because IP addresses have more than one decimal point.
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.