added some missing SQL features
CE-258 #close fixed
CE-257 #close fixed