C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
SQL TRUNCATE TABLEA truncate SQL statement is used to remove all rows (complete data) from a table. It is similar to the DELETE statement with no WHERE clause. TRUNCATE TABLE Vs DELETE TABLETruncate table is faster and uses lesser resources than DELETE TABLE command. TRUNCATE TABLE Vs DROP TABLEDrop table command can also be used to delete complete table but it deletes table structure too. TRUNCATE TABLE doesn't delete the structure of the table. Let's see the syntax to truncate the table from the database. TRUNCATE TABLE table_name; For example, you can write following command to truncate the data of employee table TRUNCATE TABLE Employee; Note: The rollback process is not possible after truncate table statement. Once you truncate a table you cannot use a flashback table statement to retrieve the content of the table.
Next TopicSQL COPY TABLE
|