There is a way to significantly improve SQL security with very few changes to the existing systems.
The following essay describes my proposal:
http://file.bestmx.net/ee/articles/sql-security.pdf
also see:
T-DOSE 2013 Open Source, Evgeny Panferov, Building New SQL
http://www.youtube.com/watch?v=DuDynhuL0QI
more at:
First 7 minutes of this recording are missing.