How to delete all data from SQL table

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to delete all data from SQL table

Nikolay Izhikov
Hello, guys.

I wonder what is best way to delete all rows from table?

Other RDBMS offer command like `TRUNCATE TABLE` or similar.

Is it would be faster if user execute `DROP TABLE XXX`, `CREATE TABLE XXX` instead of `DELETE FROM XXX`?
Reply | Threaded
Open this post in threaded view
|

Re: How to delete all data from SQL table

Vladimir Ozerov
DROP TABLE + CREATE TABLE is the fastest way at the moment. TRUNCATE will
be supported at some point in future.

чт, 25 янв. 2018 г. в 15:56, Nikolay Izhikov <[hidden email]>:

> Hello, guys.
>
> I wonder what is best way to delete all rows from table?
>
> Other RDBMS offer command like `TRUNCATE TABLE` or similar.
>
> Is it would be faster if user execute `DROP TABLE XXX`, `CREATE TABLE XXX`
> instead of `DELETE FROM XXX`?
>