updated script sql.