sql handling in place