All Forums Database
DanB 3 posts Joined 12/09
04 Jan 2010
Convert Volatile Table to Permanent Table

Can someone show me the code that you would use to convert a volatile table to a permanent one?

sunitha_cv 12 posts Joined 05/09
05 Jan 2010

Hi,Happy new year:)Why do you want to convert volatile table to permanent table?Just I want to know the reason becuase you can create permanent table with volatile table structure.Thanks.

Jimm 298 posts Joined 09/07
05 Jan 2010

You cannot convert the existing table to permanent, but you can:Create Table permtable From volatiletable with Data ;That will create a table same as the volatile table (columns, indices) and copy the data across.As for why, if you have to go through a number of insert/ update steps to pull your data together, it is much faster in volatile because there is much less recovery overhead. Then just save it when you have finished.

Jim Chapman 449 posts Joined 09/04
05 Jan 2010

The correct syntax is:Create Table permtable AS volatiletable with Data ;

You must sign in to leave a comment.