Home » SQL & PL/SQL » SQL & PL/SQL » how to delete all the rows from a table?
how to delete all the rows from a table? [message #2468] Thu, 18 July 2002 07:08 Go to next message
figen
Messages: 10
Registered: July 2002
Junior Member
Truncate or Delete? I know Delete might cause a lot of rollback and fire all the delete triggers. But I cannot use "Truncate" command from a procedure, because it is DDL command.

I am writng a Java script which will call Procedure and take the "table_name" as an argument and delete all the rows in that table.

Is there any way doing this from a Java Script other than Procedure or how should be the procedure?

Thanks in advance
Re: how to delete all the rows from a table? [message #2486 is a reply to message #2468] Fri, 19 July 2002 09:28 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
execute immediate 'truncate table ' || p_table_name;
Previous Topic: Schema Name.
Next Topic: inserting data from one table to another using sql
Goto Forum:
  


Current Time: Thu Apr 25 02:25:11 CDT 2024