SqlScriptDOM icon indicating copy to clipboard operation
SqlScriptDOM copied to clipboard

RESUMABLE in ALTER TABLE (Transact-SQL) reports not valid option

Open naveennaik1 opened this issue 10 months ago • 0 comments

Version - 170.28.0

The following query mentioned in ALTER TABLE (Transact-SQL) reports the following error while parsing using TSql160Parser . Tried it with TSql160Parser, as well as 150 and 140, just to make sure.

Error : Option 'RESUMABLE' is not a valid index option in 'ALTER TABLE' statement.

Steps to reproduce

        static void Main(string[] args)
        {
            var script = @"
ALTER TABLE table1
ADD CONSTRAINT PK_Constrain PRIMARY KEY CLUSTERED (a)
WITH (ONLINE = ON, MAXDOP = 2, RESUMABLE = ON, MAX_DURATION = 240);
";

            var parser = new TSql160Parser(true, 0);
            var fragment = parser.Parse(new StringReader(script), out var parseErrors);

            if (parseErrors.Count > 0)
            {
                Console.WriteLine(parseErrors[0].Message);
            }
        }

naveennaik1 avatar Mar 21 '25 07:03 naveennaik1