Tech Mahindra Interview Question

Technical Interview 1.Difference between Delete and truncate difference? 2.Explain OOPs? 3.Explain Polymorphism?

Interview Answer

Anonymous

Feb 4, 2021

As we know that TRUNCATE will remove all the rows without removing the table’s structure from the database. The same work can be done with the help of the DELETE command on removing all the rows from the table. But there is a significant difference in re-initialization of PRIMARY KEY AUTO_INCREMENT between both the commands.