Tag Info

New answers tagged

-3

TRUNCATE TABLE_NAME; does the magic for you.


-2

You should use TRUNCATE instead of DELETE if you is using SQL Server. Because it will reduce log records in log file. USE <your database>; GO DECLARE @table_name varchar(100); DECLARE c CURSOR FOR SELECT name FROM sys.tables WHERE type='U' OPEN c FETCH NEXT FROM c INTO @table_name WHILE @@FETCH_STATUS =0 BEGIN EXEC (N'TRUNCATE TABLE ...


2

Generate the statements you need select 'DELETE FROM '||table_name||' ;' from user_tables;


0

I have used other number to calculate this value. selec (TO_DATE('1970-01-01','YYYY-MM-DD') + unix_timestamp / 86400000) from dbname; This script is OK to me.



Top 50 recent answers are included