Maybe <Left> and <Right> mapped to something else? Try this while editing the SQL file:
:imap <Left>
This should tell you if it is matched against anything. You can cancel it as
:iunmap <Left>
If any syntax file displays <Left> and <Right> strangely, you may need to track it and edit it, as well as configure .vimrc to override these mappings (e.g. via autocmd).
source share