Sql table generation script