Unlike TRUNCATE, which just deletes the data from the tables, the DROP command deletes both the data and the table's complete schema/structure from the database.
To remove a table definition and its contents, use the DROP command. The TRUNCATE command, on the other hand, is used to delete all of the rows from a table.
Dropping a database removes the database from a SQL Server instance as well as the actual disc files it uses. The disc files are not erased if the database or any of its files is offline when it is dropped. Using Windows Explorer, you can manually delete these files.
To remove a table definition and its contents, use the DROP command. The TRUNCATE command, on the other hand, is used to delete all of the rows from the table.
TRUNCATE TABLE entirely depletes a table. It necessitates the DROP permission. TRUNCATE TABLE is equivalent to a DELETE statement that deletes all rows or a series of DROP TABLE and CREATE TABLE commands in terms of logic. TRUNCATE TABLE skips the DML method of eliminating data in order to achieve high efficiency.
Learner's Ratings
4.2
Overall Rating
53%
33%
3%
0%
11%
Reviews
K
Karan kadam
5
thank you sir!!!
S
savnesh daksh
5
Good
S
Sparsh Gaur
4
arey kiske barabar
ARPIT ARORA
5
Error is 11:35:07 SELECT * FROM PRODUCTS group by PROD_CODE LIMIT 0, 1000 Error Code: 1055. Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'learn_vern.PRODUCT
S
Swapnil Chilwant
5
Well, a structured course, with amazing teaching techniques by meet shah sir Thank you, LearnVern team.
S
Sunil Bhargav
5
good
G
Ganesh Kandu
5
you didn't mentioned about self join
M
mukul kumar
4
please make a assignment solution video, explanation is very good
S
saurabh kushwah
5
Thank you LearnVern to teach us the best courses at no cost these courses are very amazing keep going and keep teaching as same as you doing. Please add DSA course also.
M
Manabendra Nath
4
Bahoot ascha samjhate hain lekin, thora sa slow samjhata hain jo thora booring lagte hain,(Just my opinion). Thank you.
Share a personalized message with your friends.