tag:blogger.com,1999:blog-8712770457197348465.post7219648492914642374..comments2024-03-17T23:01:26.872-07:00Comments on Javarevisited: Difference between Truncate and Delete in SQL? Examplejavin paulhttp://www.blogger.com/profile/15028902221295732276noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-8712770457197348465.post-86268376879179786622017-06-13T12:35:13.112-07:002017-06-13T12:35:13.112-07:00This Post is awesome. Just adding two more points:...This Post is awesome. Just adding two more points:<br /><br />1. Removing rows with the TRUNCATE TABLE statement can be more efficient than dropping and re-creating a table. Dropping and re-creating a table invalidates dependent objects of the table, requires you to regrant object privileges on the table, and requires you to re-create the indexes, integrity constraints, and triggers on the table Amberhttps://plus.google.com/u/0/107076927237564703839noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-27438205484433813262017-01-13T21:18:46.689-08:002017-01-13T21:18:46.689-08:00thank you so much for detail interview questions a...thank you so much for detail interview questions and detail answer for all i really learn a lot plus it really clear my answer for truncate and delete and learn clear difference of bothAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-34755662897919058382016-05-06T12:56:34.253-07:002016-05-06T12:56:34.253-07:00Very nice post!Very nice post! <a href="https://autobinarysignalsreview.blogspot.com/" rel="nofollow"></a>Anonymoushttps://www.blogger.com/profile/02249374780754943698noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-71521578578842882502013-08-07T21:05:34.172-07:002013-08-07T21:05:34.172-07:00@Anonymous, Yes, DROP is an alternative, if fits t...@Anonymous, Yes, DROP is an alternative, if fits the criterion e.g. resetting of ID columns. When we DROP and recreate a table, ID column will restart from it's first value.Javin @ Refrential integrity in databasehttp://javarevisited.blogspot.com/2012/12/what-is-referential-integrity-in-database-sql-mysql-example-tutorial.htmlnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-47202669277269782872013-08-07T03:45:34.170-07:002013-08-07T03:45:34.170-07:00wrt the below asked question
5) How will you dele...wrt the below asked question <br />5) How will you delete data if truncate is not supported and log segment is also not big enough to support complete delete?<br /><br />would Drop and create be a better option ??????<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-15091819725911717172013-07-16T23:08:01.056-07:002013-07-16T23:08:01.056-07:00using batch size we can delete rows from the table...using batch size we can delete rows from the tableAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-59405451439957665912013-07-15T03:09:14.328-07:002013-07-15T03:09:14.328-07:00database is large and truncate not supported..
log...database is large and truncate not supported..<br />log is not enough.. provide solution for this question plz.. m following this blog since last 1 month by recommendation of my teacher..n really i found much much beneficial and very clearly blog..thnks a lot.. Anonymoushttps://www.blogger.com/profile/01793784301093000528noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-2723853319930979082013-05-16T19:59:49.093-07:002013-05-16T19:59:49.093-07:00truncate reset identity column means, if you last ...truncate reset identity column means, if you last id was 100, after truncate it will start again with 1.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-78340310908775917602012-07-16T21:43:56.973-07:002012-07-16T21:43:56.973-07:00Hi Javin,
When you say truncate would reset the i...Hi Javin,<br /><br />When you say truncate would reset the identity column, do you mean the foreign key which was referring to the table that was truncated? Could you explain this with examples.Vijay Rhttps://www.blogger.com/profile/17862972370501524349noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-8879243479614735552012-06-06T08:18:46.931-07:002012-06-06T08:18:46.931-07:00One of the important thing to note while using tru...One of the important thing to note while using truncate is that it will reset your Identity column if you have any.Javin @ select query to get counthttp://javarevisited.blogspot.com/2011/10/selct-command-sql-query-example.htmlnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-10646679563326174112012-04-14T02:51:40.258-07:002012-04-14T02:51:40.258-07:00GreT post. Seeing the link I was thinking whtz the...GreT post. Seeing the link I was thinking whtz the big deal by it as I already know it but posts always tend to go that extra mile to make it more detailed . Thanks for tht . Also In case you are looking for new topics to blog,request to take a look at the google java interview questions . Questions like how to find matching strings from 2 string arrays If each array has 1 million records etcAjithnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-14642414100393153032012-04-10T21:49:33.881-07:002012-04-10T21:49:33.881-07:00difference between truncate and delete is one of t...difference between truncate and delete is one of the most popular SQL interview question and has been asked many times to many people but more than that if you know real differences between delete and truncate you can avoid mistakes while dealing with large and sensitive data. mostly in report writing, database cleanup, correct use of truncate and delete is must.SQL Beginnernoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-77973026788129579452012-02-03T22:47:13.046-08:002012-02-03T22:47:13.046-08:00@ARVIND, thanks for your comment. glad to hear tha...@ARVIND, thanks for your comment. glad to hear that you like this truncate and delete tutorial on SQL.Javin @ unix command interview questionshttp://javarevisited.blogspot.com/2011/05/unix-command-interview-questions.htmlnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-87227997238880993242012-01-29T22:48:00.558-08:002012-01-29T22:48:00.558-08:00thanks a lot for the information really appreciate...thanks a lot for the information really appreciate you,for spending your time in giving this useful information for many new learners like me.who are new to this field of study.ARVINDhttps://www.blogger.com/profile/06936597743742203782noreply@blogger.com