|
-
Jul 19th, 2016, 06:42 PM
#4
Re: Table Save and Restore
I came from mainframe world as well.
I gave you 3 samples of scripts.
The first CREATE's a table. You said you have new tables.
The second modifies an existing table adding a field in the middle of all the other fields and keeping the data intact.
The third shows the creation of a function - if you do not use STORED PROCEDURES or SCALAR functions in your DB then ignore that.
Point is that I do not use SSMS to modify table structure.
All SSMS does is create a script internally to modify an existing table - usually coping off the entire table to a temp location and dropping/re-creating that table with new columns and then re-loading it from the temp table.
If you look at my second example I am using a combination of FIELD RENAME and FIELD ADDING techniques to add a new field - shifting an existing field to the right and then re-loading just that one column.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|