+ 1
Difference between drop and delete?
5 Answers
+ 2
Here's a good explanation:
1. drop table tablename;
After this, it's gone. No more table. No more data.
Use this when you don't need that table any more.
2. truncate table tablename;
After this, the table is empty, and (importantly) auto-incrementing keys are reset to 1. It's quite literally like having a brand new table.
Use this when you just want an empty table. It's faster than DELETE because it simply deletes all data. DELETE will scan the table to generate a count of rows that were affected.
3. delete from tablename;
This lets you filter which rows to delete based on an optional WHERE clause.
Use this when you want to delete specific records, eg: DELETE FROM tablename WHERE username = 'joe
0
delete is manipulation comand drop is a definition comand eg. u can delete a column using a drop nd for delete u can delete a line
0
Drop : the whole table will be lost
0
Delete : it is similar to alter
0
DELETE is used to remove data value of certain/specific row whereas DROP can delete whole table or specified columns , not row..