Fix SQL command