DROP:- Tables,Databases,Indexes can be easily removed using DROP Statement.
EX:-DROP TABLE table-name
Deletes table completely from database.
similarly DROP INDEX index-name
DROP DATABASE database-name
TRUNCATE:-
EX:- TRUNCATE TABLE table-name
Keeps table structure but deletes data in it.
.
DELETE:-
EX:- DELETE FROM table-name [WHERE] [some-column1]=[some-columnvalue1] [AND] [some-column2=some-columnvalue2]
EX:-DROP TABLE table-name
Deletes table completely from database.
similarly DROP INDEX index-name
DROP DATABASE database-name
TRUNCATE:-
EX:- TRUNCATE TABLE table-name
Keeps table structure but deletes data in it.
.
DELETE:-
EX:- DELETE FROM table-name [WHERE] [some-column1]=[some-columnvalue1] [AND] [some-column2=some-columnvalue2]
No comments:
Post a Comment