Author Topic: Ano difference ng TRUNCATE at DELETE in MYSQL?  (Read 91 times)

0 Members and 1 Guest are viewing this topic.

Offline Corps

  • Sr. Member
  • *
  • Posts: 276
  • Karma: +0/-0
    • View Profile
Ano difference ng TRUNCATE at DELETE in MYSQL?
« on: July 22, 2016, 06:26:01 AM »
Ano difference ng TRUNCATE at DELETE in MYSQL?

Techronnati | where technology never sleeps

Ano difference ng TRUNCATE at DELETE in MYSQL?
« on: July 22, 2016, 06:26:01 AM »

Mountain View

Offline MrSpecialist

  • Sr. Member
  • *
  • Posts: 345
  • Karma: +1/-0
  • I'm an expert!
    • View Profile
Re: Ano difference ng TRUNCATE at DELETE in MYSQL?
« Reply #1 on: July 22, 2016, 06:27:25 AM »
isa sa mga common interview questions eto... Here's the basic difference.

1: DELETE  is a DML(data manipulation lnguage) command whereas truncate is a DDL(data definition language) command.
2 : Truncate is much faster than Delete.
3 : We can not roll back in truncate but in delete we can rollback.
4 : We can not use where clause in truncate but in delete we can use conditions using where clause.

Hope this helps.

 

Related Topics

  Subject / Started by Replies Last post
2 Replies
50 Views
Last post July 24, 2014, 09:37:18 AM
by GBTalk
0 Replies
89 Views
Last post March 11, 2015, 08:56:55 AM
by JusticeLeague
0 Replies
129 Views
Last post July 27, 2016, 09:16:00 AM
by MrSpecialist
0 Replies
141 Views
Last post August 11, 2016, 01:38:56 AM
by h2obubbler
2 Replies
237 Views
Last post August 29, 2016, 11:50:27 AM
by LadyProgrammer

Posting Disclaimer: Any individual may post a message in this forum and may do so anonymously. Therefore, the sole author is exclusively and entirely responsible for all opinions in that message. They do not represent the official opinions of Techronnati, its administrators or moderators or the Techronnati Management. Techronnati is merely acting as an impartial conduit for constitutionally protected free speech and is not responsible and will not be held liable for the content of such messages. All images and service logos are trademarks of their respective owners.