Top Posters
Since Sunday
22
21
20
17
16
15
15
14
14
14
14
14
New Topic  
wrote...
Posts: 87
Rep: 0 0
2 months ago
What is the process and what are the considerations when changing a table name?
Source  Download
Database Processing: Fundamentals, Design, and Implementation
Edition: 15th
Authors:
Read 14 times
2 Replies
Replies
Answer verified by a subject expert
wrote...
Posts: 105
2 months ago
Sign in or Sign up in seconds to unlock everything.
To change a table name, we re-create the table with the new name, copy the data to the new table, and finally drop the old table. Although the process is simple, there are several considerations. First is the problem of a surrogate key, for the existing values must be maintained. This is solved by creating the key as regular field, copying the date, and then converting the column to a surrogate key. Second is the problem of restructuring constrains to make sure they now apply to the new table. Finally, any stored procedures, triggers and other application code that applied to the old table must be rewritten to apply to the new table. SQL Server 2017 also includes a sp_rename technique to change the name of the column.
This verified answer contains over 120 words.
1
Related Topics
wrote...
2 months ago
Exactly what I needed for my project, TYSM
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers.
Learn More
Improve Grades
Help Others
Save Time
Accessible 24/7
  341 People Browsing
 118 Signed Up Today
Related Images
 529
 299
 104