SQL Flow Field Guide

CREATE TABLE ... WITH (MEMORY_OPTIMIZED = ON)

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

in-memory OLTP storage

What changes

Input
table definition
Output or change
memory-optimized table

Syntax at a glance

WITH ( MEMORY_OPTIMIZED = ON [ , DURABILITY = { SCHEMA_ONLY | SCHEMA_AND_DATA } ] )

Work example

A measured in-memory workload needs a memory-optimized table.

Check memory capacity, durability, indexes, supported data types, and restart behavior in a representative lab.

Check your work The table meets its latency goal and remains within the planned memory budget.

Open Microsoft Learn for full syntax, permissions, and details for your version.