I have an SQL script that outputs these, given a table name:
- the column names in the table
- the datatypes for those columns
- the column allows
NULL
or not - the column has unique constraint or not.
Like this:
column | datatype | nullable | unique
--------------------------------------
| | |
| | |
| | |
Then I save the result of the script into a csv file, and run a python script to do something else with the result1. Now, what I want to do is automate the process. For about 2000 tables in the database, it is painstakingly clumsy to do the running-sql-script then saving-to-csv-file and then running-python-script cycle for each of those 2000 tables.
Is there any way to automate this in SSMS. I am using SSMS 2014. I have looked here. Though that is related, that isn't actually what I want.
1. I use the python script to create a C# domain class to be used by entity framework.