add sql enhancements