sql generator scripts