update the sql statement