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
Where’s database data actually stored? Is there a way to see the files which are stored?
What are features of mysql?
What is pragma autonomous_transaction?
How to drop an existing table in mysql?
what is the difference between gui testing and database testing? : Mysql dba
Can we join 3 tables in mysql?
What are the benefits of mysql?
How do I assign a variable in mysql?
why not null is not allowed at table level
Hi Team, This is kartik, I recently completed my B-tech. Importance of posting this question is for to know the best books on SQL(MYSQL/Oracle)? I like SQL concept's so much, at the same time i decided to choose SQL for my career purpose. So please suggest me the best books that are very helpful for a fresher to improve concepts like (SQL/PLSQL)Basics, programming concepts, architectures etc. Please consider my request as an important one. I am very thankful to you for providing this opportunity. If possible can you please send the names of books for my personal id also: karthikgdv1206@yahoo.com. Thanks, Kartik T
What is the difference between mysql_fetch_assoc and mysql_fetch_array?
Does insert statement lock the table?
How do I start mysql client?
How do I delete a table in mysql workbench?
Is mysql same as mariadb?