Updates to SQL stuff. Mostly syntax, etc.