Hi,
I've submitted[1] some useful portions of my SQL editing hacks for
emacs. I generally use them for navigating PostgreSQL (dump) scripts,
but it works for other RDBMSes as well. I hope it would work for you as
well.
Regards.
[1] http://www.emacswiki.org/emacs/SQLSourceSearch