Transact-SQL Support for In-Memory OLTP
You can access memory-optimized tables using any Transact-SQL query or DML statement (SELECT, INSERT, UPDATE, or DELETE), ad hoc statement, and SQL module such as stored procedures, table-value functions, scalar functions, triggers, and views. For more information see Accessing Memory-Optimized Tables Using Interpreted Transact-SQL.
Stored procedures that only reference memory-optimized tables can be natively compiled into machine code and typically provide significant performance gains over interpreted (disk-based) stored procedures. For optimized access to memory-optimized tables use natively compiled stored procedures. For more information, see Natively Compiled Stored Procedures.
When creating and modifying database objects (DDL statements), the following statements have been modified:
ALTER DATABASE File and Filegroup Options (Transact-SQL) (see MEMORY_OPTIMIZED_DATA)
CREATE DATABASE (SQL Server Transact-SQL) (see MEMORY_OPTIMIZED_DATA)
CREATE PROCEDURE (Transact-SQL) (see NATIVE_COMPILATION, SCHEMABINDING, EXECUTE AS, and BEGIN ATOMIC)
CREATE TABLE (SQL Server) (see MEMORY_OPTIMIZED, DURABILITY, BUCKET_COUNT, INDEX, and HASH)
CREATE TYPE (Transact-SQL) (see MEMORY_OPTIMIZED, BUCKET_COUNT, INDEX, and HASH)
DECLARE @local_variable (Transact-SQL) (see NULL | NOT NULL)
Memory-optimized tables support PRIMARY KEY and NOT NULL constraints. For information on implementing unsupported constraints, see Migrating Check and Foreign Key Constraints.
For information on unsupported features, see Transact-SQL Constructs Not Supported by In-Memory OLTP.