Phil Parkin (2/12/2016)
mw112009 (2/12/2016)
Reply to Post #1760966 from LynnThe answer is "YES" ( I mean I am able to modify the code )
Why do I need the code ?
I have to copy tables to another db ( in another server ) .
Yes, I could do that by doing a backup and restore.
But the script will be very handy and I can get a novice to run a script easily.
So then the objective is to create one script that will have all the table defs.
Hope I answered your question.
This is easy via SSMS (right-click DB / Tasks / Generate Scripts).
I can't understand why the thread is so long.
+1000. And, if you setup the scripting correctly, you get all the constraints (including FKs), indexes, triggers, schema names, privs, etc, etc.
--Jeff Moden
Change is inevitable... Change for the better is not.