Skip to content

Instantly share code, notes, and snippets.

@arekgotfryd
Created November 28, 2018 13:03
Show Gist options
  • Save arekgotfryd/fa170bfb5e4b0045264f70c7b6f4844b to your computer and use it in GitHub Desktop.
Save arekgotfryd/fa170bfb5e4b0045264f70c7b6f4844b to your computer and use it in GitHub Desktop.
1. Create table with PRIMARY_KEY
CREATE TABLE dbo.AuditLog
(
AuditLogID int constraint PK_AuditLog_AuditLogID primary key
)
2. Create table with unique clustered
CREATE UNIQUE CLUSTERED INDEX PK_AuditLog_AuditLogID
ON dbo.AuditLog(AuditLogID)
WITH DROP_EXISTING
ON [Primary]
3. Then you should be able to create spatial index in SSMS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment