Deleting all rows using delete from data store entity

Hi,

I am trying to delete all the existing rows from the data entity using delete from data store entity smart service. Can anyone please suggest me what to include in identifiers if we want to delete everything without specifying all the identifiers?

Thanks

Yeswanth.

  Discussion posts and replies are publicly visible

Parents
  • Hello Yeswanth,

    The suggestions above are good I just want to add some notes here.
    If you want to delete everything and the table is not huge maybe passing all the IDs is ok (maybe no more than 100-500 even 1000.

    What I would prefer is to use the execute store procedure as suggested by Mauricio, my suggestion here is tu use inside the stored procedure the “truncate table” instruction which deletes everything from a table. I strongly recomend this option since it is faster and it has some other advantages.

    Links that
    dev.mysql.com/.../truncate-table.html

    Hope this helps

    Jose
Reply
  • Hello Yeswanth,

    The suggestions above are good I just want to add some notes here.
    If you want to delete everything and the table is not huge maybe passing all the IDs is ok (maybe no more than 100-500 even 1000.

    What I would prefer is to use the execute store procedure as suggested by Mauricio, my suggestion here is tu use inside the stored procedure the “truncate table” instruction which deletes everything from a table. I strongly recomend this option since it is faster and it has some other advantages.

    Links that
    dev.mysql.com/.../truncate-table.html

    Hope this helps

    Jose
Children