commit sql method