Home Forums Programming General Refreshing a table using CREATE TABLE, DROP and Rename RE: Refreshing a table using CREATE TABLE, DROP and Rename

  • I have the same situation, but I don't rename the original. I create the temporary table and populate it, drop the original and rename the temporary one to the original name. It takes the downtime created by a 30-ish second build process down to 53 ms, which is acceptable to the business.

    The only downside I know of is that the space is consumed by both tables until I fire the sp_rename, but that's okay with me.