web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

what is the differnce between clearing or deleting tmp table.

(0) ShareShare
ReportReport
Posted on by 1,552

so i'm using an inMemory tmp table inside a loop.

1. what would be the difference if i clear the tmp table at the beginning of the loop or i use delete_From? 

2. and does in memory tables save values until the loop ends  while tmpDB tables still save the value after the while loop?

I have the same question (0)
  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi JuniorAX,

    1. Could you, please, explain what do you mean "clear tmp table"?

    2. The difference is only where data is stored: in memory (or disk) or in temp table in DB.

  • Suggested answer
    Pete Alberts Profile Picture
    3,542 on at

    Hi Junior AX

    The clear() method is to clear the fields in the current record. The delete_from keyword is for a set based SQL delete. So using delete_from in the beginning of your statement will not make sense.

    And then the difference between InMemory and TempDB - docs.microsoft.com/.../temporary-inmemory-tables

  • Suggested answer
    nmaenpaa Profile Picture
    101,166 Moderator on at

    As mentioned by Pete, calling .clear() clears the current table buffer.

    Delete_from statement deletes records from the database (or wherever they are stored).

    These statements work exactly the same with normal or temp tables.

    Both types of temp tables (InMemory and TempDB) retain the data until the table buffer variable goes out of scope.

    For example if you introduce the temp table buffer variable in a method, the data disappears after the method has been executed.

    Or if you introduce the variable inside a loop, the data only exists until that particular loop iteration is completed.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 514 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 390

#3
Adis Profile Picture

Adis 266 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans