Subject Truncate table
Author ck1625

I need to clear some tables completely in a batch process. I know, the fastest would be to drop and recreate these tables. But to do this, I need to drop and recreate foreign keys as well.

I would like a "local" solution, this means to save all DDL information before dropping the table, then recreate it from there.

What is the best way to do that? Or is there another solution?

Right now I do
SELECT * FROM <table>
I do it here, so that the time for the first SELECT is lost during deletion and not later when somebody does the first restart.

I work with Delphi / UniDac.

cu Christian