Finish update uid sql.