J Livingston SQL (2/13/2016)
Jeff Moden (2/13/2016)
mw112009 (2/12/2016)
Jeff MWhat we need is to be able to do via T-SQL and also we need to get the def for all tables ( Not just picking one at a time )
We found the code at another website.
So the issue is resolved.
Cool. Please post the link for the website that you found the code on. Thanks.
I believe that this is the site from reading the posts
http://sqlindia.com/generate-table-definitions-using-tsql-sql-server/
see my post above
Thanks, Graham. I'll check it out. I found what looks like a great article on the subject by Phil Factor. Here's the link.
If you know me, I'm not adverse to using xp_CmdShell to call PowerShell.
As a bit of a sidebar, his note on using SQLCompare from the command line to generate scripts seems to be what I'd probably use just because its so bloody simple. I'm sure there are other options for that command line. It's in the beginning of the section titled "Automated scripting of objects".
--Jeff Moden
Change is inevitable... Change for the better is not.