'getting error the operation 'alter table add index' is not supported with memory optimized tables in sql server

I am working with sql server, I need to add index for the column, when adding index it gives me error the operation 'alter table add index' is not supported with memory optimized tables., can anyone please tell me how can i resolve this issue ? Here is my table structure

CREATE TABLE "tb_Episode" (
    "ID" INT NOT NULL,
    "EpDataID" INT NULL DEFAULT NULL,
    "UploadID" INT NULL DEFAULT NULL,
    "CustID" INT NULL DEFAULT NULL,
    "BranchID" INT NULL DEFAULT NULL,
    "Branch" VARCHAR(20) NULL DEFAULT NULL,
    "LastName" VARCHAR(19) NULL DEFAULT NULL,
    "FirstName" VARCHAR(12) NULL DEFAULT NULL,
    "Middle" VARCHAR(1) NULL DEFAULT NULL,
    "MRN" INT NULL DEFAULT NULL,
    "MedicareNbr" VARCHAR(10) NULL DEFAULT NULL,
    "EpStart" DATE NULL DEFAULT NULL,
    "EpEnd" DATE NULL DEFAULT NULL,
    "SOCDate" DATE NULL DEFAULT NULL,
    "DOB" DATE NULL DEFAULT NULL,
    "SysBranch" VARCHAR(24) NULL DEFAULT NULL,
    "PhyLastName" VARCHAR(24) NULL DEFAULT NULL,
    "PhyFirstName" VARCHAR(13) NULL DEFAULT NULL,
    "SNVisits" INT NULL DEFAULT NULL,
    "PTVisits" INT NULL DEFAULT NULL,
    "OTVisits" INT NULL DEFAULT NULL,
    "HHAVisits" INT NULL DEFAULT NULL,
    "MSWVisits" INT NULL DEFAULT NULL,
    "STVisits" INT NULL DEFAULT NULL,
    PRIMARY KEY ("ID")
)
;


Solution 1:[1]

Use CREATE INDEX statement instead of ALTER TABLE ... ADD INDEX.

CREATE INDEX Index_Name
ON Table_Name (Column_Name)

Explanation:

The error message is a bit deceiving. It's just the wrong syntax you're using.

Also, your table does not appear to be memory optimized because I don't see MEMORY_OPTIMIZED=ON in your create table statement.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1