0

is it possible to generate a MEMORY_OPTIMIZED table with an SELECT INTO statement? Something like:

SELECT *
INTO MemoryOptimizedTargetTable
FROM SourceTable;

Or at least convert the target after the SELECT INTO with an ALTER statement?

Thanks

1 Answer 1

1

No.

With SQL Server 2017 it will be possible to specify a filegroup, but that's as far as it goes into customizing the created table.

Since SELECT ... INTO ... is equivalent to CREATE TABLE, to be fully customizable it would require all options CREATE TABLE has. This is not really feasible. Once you realizE that in effect you are creating a table and inserting rows into it, why not do just that?

CREATE TABLE ...
INSERT ... SELECT ...
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.