Modified sql scripts which have some errors.