What are the differences between drop a table and truncate
a table?
Answer Posted / guru
1.DELETE:
- delete space allocated by mysql server and the structure of table remains same.
- used by either 'WHERE' clause or without it in mysql.
- data can be roll backed
2.TRUNCATE:
- Remove rows from mysql table but the structure of table remains same.
- The data cannot be roll backed
- can be used by only without 'WHERE' clause in mysql.
3. DROP:
- Remove whole table from mysql database.
- The data cannot be roll backed
For more details visit: http://www.phponwebsites.com/2014/01/mysql-delete-truncate-drop-difference.html
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Who owns mysql database?
How do I edit a stored procedure in mysql?
How to check if a record exists in a mysql database php?
What is the insert?
write a command to view the content of the table
What is a result set object?
What is back end and front end?
What is the usage of regular expressions in mysql?
How can you filter the duplicate data while retrieving records from the table?
what is constraints? Also explain the different types of constraints?
What are the 5 r's of managing behaviors?
What are queries used for?
can you tell what are the different set operations available in mysql? : Mysql dba
Write command to import an mysql file?
What are the limitations of mysql?