top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

How can we alter a huge table in SQL

+4 votes
55 views

My table is too big and now i realize that i need to add few columns in that, but when i tried to do this, my alter script took more then 4 hours and database performance also got degraded, so i canceled the query, can anyone suggest better way of doing that

posted Feb 27, 2014 by Neeraj Pandey

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes
 
Best answer

One way is you back up the table first then truncate it, then alter your table. after that insert data in it.

answer Mar 1, 2014 by Prachi Agarwal
Similar Questions
+1 vote

When writing a T-SQL script that I plan on re-running, often times I use temporary tables to store temporary data. Since the temp table is created on the fly, I'd like to be able to drop that table only if it exists (before I create it).

I'll post the method that I use, but I'd like to see if there is a better way.

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...