in reply to Perl script to extract SQL server table DDL into a flatfile

abidshariff:

I'd suggest installing DBI and playing with it a bit. Then when you're comfortable, review the bits on "table_info" and "column_info" to figure out how to read the information about tables and columns. Alternatively, you can use the various views your database provides to dig out the information you want. All the major databases I've used have views you can access to determine the structure of your database.

Once you have that, it's a simple matter of coding to find the information you want, and format it into the output you want.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

  • Comment on Re: Perl script to extract SQL server table DDL into a flatfile