If using an in-memory table in SQL Server 2016, can I define a column in that table as a foreign key from a non in-memory (or disk bound) table? I know that the foreign key does need to be the primary key of the referenced table.

I'm just wondering about the limitations and reliability of in-memory tables and how well they work with disk bound tables in SQL Server 2016.

1 Answer 1


Does SQL Server 2016 support foreign keys in an in-memory table from a disk bound table

No, not at this time - A foreign key between a disk based table and memory optimized table is not allowed.

You will get below error :

Msg 10778, Level 16, State 0, Line 3

Foreign key relationships between memory optimized tables and non-memory optimized tables are not supported.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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