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
What are the security alerts while using mysql?
How does mysql encrypt passwords?
What are the differences between innodb and myisam engines?
What are the types of index?
Why do we use pragma autonomous transaction?
How do I clear a mysql database?
Is mysqli deprecated?
How do I show users in mysql?
What is identity in mysql?
What is max_used_connections in mysql?
Which mysql function is used to concatenate string?
How do I create a database in mysql workbench?
what is mySQL. Is there any specific qualification required to do this course ? What is the scope in India after doing mySQL
What is federated tables in mysql?
what are the different tables present in mysql? : Mysql dba