Skip to content

Instantly share code, notes, and snippets.

@nomoregrapes
Created October 7, 2015 10:39
Show Gist options
  • Save nomoregrapes/52929fbd911e8c0c9382 to your computer and use it in GitHub Desktop.
Save nomoregrapes/52929fbd911e8c0c9382 to your computer and use it in GitHub Desktop.
Handy mySQL queries for fixing data
# When lat/lon are the wrong way round in a table called "location". Where clause works for UK, adjust for elsewhere.
# UPDATE location SET lat=(@temp:=lat), lat = lon, lon = @temp WHERE lat < 45;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment