I use temporary tables for complex processing which is done in several "child" procedures. These procedures are working in the same session, so the temp tables are accessible for them.

Is there a similar option for memory-optimized tables?

  • 1
    Sure, you can create memory-optimized table types, and use them like table variables. There are three good articles at the top of this search. Commented Feb 1, 2018 at 15:08
  • @AaronBertrand Yes, I read the article, but didnt recognized the solution, which is slightly different to "normal" temp tables. Thanks a lot. You made my day Commented Feb 1, 2018 at 15:22

1 Answer 1


In your case, you'd have to use a memory-optimized table variable, and assuming that the child procedures are called by the same SPID, there shouldn't be an issue with visibility. Please see this link:


I will caution you that the cardinality estimator still assumes 1 row for memory-optimized table variables, and this can be an issue for performance.

More info at this link:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.