Created
November 2, 2018 10:15
-
-
Save Ikhiloya/48b73391588f82f8f8803b9c3989607e to your computer and use it in GitHub Desktop.
Delete all records from a table in SQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| delete and truncate : | |
| delete from mytable | |
| This will delete all the content of the table, not reseting the autoincremental id, this process is very slow. If you want to delete specific records append a where clause at the end. | |
| truncate myTable | |
| This will reset the table i.e. all the auto incremental fields will be reset. Its a DDL and its very fast. You cannot delete any specific record through truncate. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment