Some changes in sql