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. For example, you can write following command to truncate the data of employee table 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
|
JavaTpoint offers too many high quality services. Mail us on h[email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected].
Duration: 1 week to 2 week