Difference between DELETE, TRUNCATE AND DROP in SQL.

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ต.ค. 2024
  • In this video, we'll understand the difference between DELETE, Truncate and drop. This is an important interview question.
    ✨Work related mails can be sent on:
    work.sadiasiddiqui@gmail.com
    ✨If you appreciate my work and would like to donate to support our channel, you can do so here:
    paypal.me/sadi...

ความคิดเห็น • 80

  • @crackconcepts
    @crackconcepts  ปีที่แล้ว

    ✨Link to my SQL e-book: imojo.in/rkajq9
    ✨Link to 'Switch your career easily' e-book: imojo.in/1FL7KaG
    (Perfect for anyone willing to switch to a completely new field or to a different company in the Tech World)

  • @imanoo3
    @imanoo3 3 ปีที่แล้ว +21

    Better explanation than my confused instructor. Thank you!

  • @kavitha-99
    @kavitha-99 2 ปีที่แล้ว +1

    Very cleanly explained and straight to the point. Thank you!

  • @sohammajumder9743
    @sohammajumder9743 4 ปีที่แล้ว +22

    Your voice is very sweet 🥺🥺🥺

    • @foodloverchannel1820
      @foodloverchannel1820 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

    • @justinrocky6645
      @justinrocky6645 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

    • @simranbanwait
      @simranbanwait 2 ปีที่แล้ว +2

      Sigma male never simp , anyways thanks for the video mam

    • @ANURAGSINGH-nl2ll
      @ANURAGSINGH-nl2ll 11 หลายเดือนก่อน

      Aww😂

    • @Youcefstark
      @Youcefstark 5 หลายเดือนก่อน

      😂😂😂

  • @sohammajumder9743
    @sohammajumder9743 4 ปีที่แล้ว +2

    I was facing a problem in finding the difference between these 3 but you helped me out

  • @subramaniang5265
    @subramaniang5265 4 ปีที่แล้ว +4

    Hi Mam, you are explaining in a very well manner and requesting to post similar kind of videos for SQL. Thanks for your good work and keep up the same.

  • @Tanu-mw4jg
    @Tanu-mw4jg 4 ปีที่แล้ว +7

    Good one dear.But, just remove * from delete query bcoz it will give error.
    Also,with respect to identity column there is a difference in between delete and truncate.In case of delete identity value is not reset while in case of truncate identity value gets reset to the initial seed value given in the table definition.

    • @justinrocky6645
      @justinrocky6645 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

    • @vinaykumar-xf5mo
      @vinaykumar-xf5mo 3 ปีที่แล้ว

      Go to Edit --> Preferences.
      Click "SQL Editor" tab and uncheck "Safe Updates" (rejects UPDATEs and DELETEs with no restrictions) check box.
      Query --> Reconnect to Server.

    • @ArunKumar-ri4bo
      @ArunKumar-ri4bo 2 ปีที่แล้ว +1

      Hlo mam your explanation is very good and your voice also🥰

    • @ArunKumar-ri4bo
      @ArunKumar-ri4bo 2 ปีที่แล้ว +1

      👋

  • @shashankdwivedi258
    @shashankdwivedi258 3 ปีที่แล้ว +2

    Ohh My God!!!! Your Voice is mesmerizing!!!!

  • @Shreysanthu
    @Shreysanthu 4 ปีที่แล้ว +1

    Good teaching with good and clear voice .... thank you. Better you explain practically with SQL workbench please

  • @nagarajanerode
    @nagarajanerode 3 ปีที่แล้ว

    Simple and to the point expected.

  • @yashkhade
    @yashkhade 10 หลายเดือนก่อน

    Thank you this helped me.

  • @aakashsakharkar9349
    @aakashsakharkar9349 2 ปีที่แล้ว

    yes i m also able to understand this difference thanks

  • @sank8277
    @sank8277 4 ปีที่แล้ว +4

    Nice explanation.But remove that * in delete query.if we give * query wont work

    • @harishbmn
      @harishbmn 4 ปีที่แล้ว

      Simple and clear. Be little louder mam.

    • @foodloverchannel1820
      @foodloverchannel1820 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

    • @vinaykumar-xf5mo
      @vinaykumar-xf5mo 3 ปีที่แล้ว

      Go to Edit --> Preferences.
      Click "SQL Editor" tab and uncheck "Safe Updates" (rejects UPDATEs and DELETEs with no restrictions) check box.
      Query --> Reconnect to Server.

  • @safarnaama8798
    @safarnaama8798 3 ปีที่แล้ว +1

    Firoz Alam here, concepts are well explained.

  • @stargazingblindly
    @stargazingblindly 4 ปีที่แล้ว +1

    Thank you very much you explained the difference very clearly =]

    • @justinrocky6645
      @justinrocky6645 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

  • @MiteshRathva
    @MiteshRathva 3 ปีที่แล้ว +1

    Thank you 🙏

  • @mederamadan8945
    @mederamadan8945 4 ปีที่แล้ว

    Hello from Kurdistan, Thank u varrrry🔥

  • @IQBees
    @IQBees 2 ปีที่แล้ว

    Nice Explanation

  • @doratv4892
    @doratv4892 ปีที่แล้ว

    Thank you

  • @Ganeshay-996
    @Ganeshay-996 9 หลายเดือนก่อน

    TRUNCATE command delete all rows even that Table has Primary or Foreign Key . Right ?

  • @recreate5421
    @recreate5421 2 ปีที่แล้ว

    Informative 👍🏻

  • @Nishant.420
    @Nishant.420 2 ปีที่แล้ว

    And what about drop when we use it with alter fun. To drop column...?

  • @digambar6191
    @digambar6191 ปีที่แล้ว

    thnx☺☺

  • @Shiva-zi9nw
    @Shiva-zi9nw 4 ปีที่แล้ว

    Very well explained

    • @justinrocky6645
      @justinrocky6645 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

  • @debarghyamukherjee7834
    @debarghyamukherjee7834 2 ปีที่แล้ว +2

    you should have mentioned that DELETE can be rollbacked and not DROP & TRUNCATE... anyways, good explanation

  • @techconcepts1318
    @techconcepts1318 4 ปีที่แล้ว +1

    The main difference between delete and truncate is, delete does not reset the identity value, truncate resets the identity value.

    • @justinrocky6645
      @justinrocky6645 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

  • @meghnagupta313
    @meghnagupta313 2 ปีที่แล้ว

    We do can use flashback after drop by checking is table shows still in recycle bin correct?

  • @naazvlogs12
    @naazvlogs12 3 ปีที่แล้ว

    In this drop can be rolled back using Rollback-tcl statement right?

  • @HarshaSaivizagfan
    @HarshaSaivizagfan 2 ปีที่แล้ว

    Syntax for delete and truncate

  • @kashmeershaik9217
    @kashmeershaik9217 4 ปีที่แล้ว

    Good explanation.. 😊😊👌

    • @justinrocky6645
      @justinrocky6645 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

  • @nagendrababu5740
    @nagendrababu5740 3 ปีที่แล้ว

    i think u missed (*,) as star &cama in CTE query is it correct

  • @vipinkumark4476
    @vipinkumark4476 3 ปีที่แล้ว

    Madam please attach the photo of that paper in discrimination.. It will. Be helpfull

  • @kannanr1827
    @kannanr1827 4 ปีที่แล้ว

    Good one...👌👌👏👏

  • @revanthm2982
    @revanthm2982 ปีที่แล้ว

    Need SQL notes. ..

  • @venkateshgg9519
    @venkateshgg9519 4 ปีที่แล้ว

    super
    explenation

  • @nancyguruswamy9488
    @nancyguruswamy9488 3 ปีที่แล้ว

    In delete we need to add commit ;

  • @muralikrishna8882
    @muralikrishna8882 4 ปีที่แล้ว

    Thanks madam.

    • @justinrocky6645
      @justinrocky6645 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

  • @ragavendrad574
    @ragavendrad574 3 ปีที่แล้ว

    Hi Madam,
    I want to insert data to a table ....I need to check whether data exist before inserting data... Do we have anything like check constraints ?

    • @apurvakulkarni9409
      @apurvakulkarni9409 3 ปีที่แล้ว

      I thought simply you can use desc table ....or select*from table...it shows you whether data present or not..... and one more way I thought is simply you give insert into table name(column parameters).. values (input according to column.. but take care of null not null and primary key..and insert value)..it will add new row without overwrite previous one.

  • @hemayerubandi7015
    @hemayerubandi7015 4 ปีที่แล้ว

    whta do mean by freeing the space here ? Delete from table and truncate table both will remove all the records from table .... What this space is about ? Kind of confused

    • @justinrocky6645
      @justinrocky6645 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

  • @saltech2024
    @saltech2024 ปีที่แล้ว

    Nice

  • @aayushisoni4009
    @aayushisoni4009 3 ปีที่แล้ว

    if i drop a database , all the tables under it will also be removed?

  • @snigdharoy1938
    @snigdharoy1938 4 ปีที่แล้ว +1

    Good 👍

  • @sushilpal5460
    @sushilpal5460 4 ปีที่แล้ว

    dulcet voice mam.....

    • @justinrocky6645
      @justinrocky6645 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

  • @barkatulislam4639
    @barkatulislam4639 4 ปีที่แล้ว

    Ma'am I want a better career in IT please guide me 🙏🙏🙏

    • @justinrocky6645
      @justinrocky6645 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html