How to delete all the data from the table in sqlplus oracle
I want to delete all the data rows in the table, but without dropping the table. The delete statement has a where clause so I have to give one by one for each row. Is there any other way of deleting the whole data rows in the table?
This is Oracle
and using开发者_JAVA技巧 sqlplus
You can try: TRUNCATE TABLE tableName
Truncate Table tablename
http://www.orafaq.com/faq/difference_between_truncate_delete_and_drop_commands
You can delete all records with delete from tablename
also but truncate is much faster
It will be better that you drop constraint and then use Truncate command and after getting rid of data , apply the constraint again.
Try out Bulk deletion using FORALL. In that instead of deleting one row at time an entire bulk can be deleted in a single delete transaction.
精彩评论