You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE TABLE [dbo].[mytable](
[id] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
[mycolumn] [varchar](500) NULLCONSTRAINT [PK__mytable_1] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS =ON, ALLOW_PAGE_LOCKS =ON) ON [PRIMARY]
) ON [PRIMARY]
we receive parse error on the FOR
ParseError: Required keyword: 'kind' missing for . Line 3, Col: 33.
CREATE TABLE [dbo].[mytable](
[id] [int] IDENTITY(1,1) NOT �[4mFOR�[0m REPLICATION NOT NULL,
[mycolumn] [varchar](500) NULL
CONSTRAINT [PK__mytable_1] PRIMARY KEY CLUST
Fully reproducible code snippet
tsql6="""CREATE TABLE [dbo].[mytable]( [id] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL, [mycolumn] [varchar](500) NULL CONSTRAINT [PK__mytable_1] PRIMARY KEY CLUSTERED ( [id] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY]"""sqlglot.parse(sql=tsql6, read="tsql")
Official Documentation
Please include links to official SQL documentation related to your issue.
I can't find the official MSFT documentation, but it is called out 100's of times in an exact search (IDENTITY(1,1) NOT FOR REPLICATION NOT NULL) and called out in official blog:
The text was updated successfully, but these errors were encountered:
For tsql:
we receive parse error on the
FOR
Fully reproducible code snippet
Official Documentation
![image](https://private-user-images.githubusercontent.com/1122251/262526955-8ff59d76-ab36-4f89-97ae-3b84257951c0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyOTQ3MjMsIm5iZiI6MTczOTI5NDQyMywicGF0aCI6Ii8xMTIyMjUxLzI2MjUyNjk1NS04ZmY1OWQ3Ni1hYjM2LTRmODktOTdhZS0zYjg0MjU3OTUxYzAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTFUMTcyMDIzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MDdjNjM3MTc2NjM1M2EzNWUzMmI0MzgwYzVjNjhmMjY1ODMzNzA2N2FmMjE4YjQ1MDQyNmU0NmQwMmY2MWI5MSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.hGvMrQOPj-qDjMOLeM8n8YXbmYKkSH-zkEmqjsuhHAc)
Please include links to official SQL documentation related to your issue.
I can't find the official MSFT documentation, but it is called out 100's of times in an exact search (
IDENTITY(1,1) NOT FOR REPLICATION NOT NULL
) and called out in official blog:The text was updated successfully, but these errors were encountered: