sql script updated