Created
November 2, 2018 10:15
-
-
Save Ikhiloya/6cacde678f80d85aed35c618c07d98f3 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