MySQL: "DROP TABLE" completely deletes a table or just a structure?

My impression is that the MySQL command DROP TABLE Userwill simply delete the data, columns, and associated restrictions. However, the table wrapper still exists. Is it correct?

+4
source share
4 answers

Use DROP TABLEwill delete the entire table and all records contained within it. If you want to keep the table structure but delete all the data, consider using it TRUNCATE TABLE. Truncating a table is done by deleting the entire table and then recreating it. This is faster than execution DELETE FROM yourTable, which deletes records one by one.

+3
source

Drop Table , ( " " ); TRUNCATE TABLE , reset auto-increment , TRUNCATE, , .

+2

mysql drop table :

! .

, ( ) .

0

Source: https://habr.com/ru/post/1690045/


All Articles