I get the following error when I try to insert a row into an Azure SQL table.
Tables without a clustered index are not supported in this version of SQL Server. Create a clustered index and try again.
My problem: I have a clustered index in this table. I used Azure MW SQL to create Azure SQL Script.
Here is what I use:
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tblPasswordReset]') AND type in (N'U')) DROP TABLE [dbo].[tblPasswordReset] GO SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tblPasswordReset]') AND type in (N'U')) BEGIN CREATE TABLE [dbo].[tblPasswordReset]( [PasswordResetID] [int] IDENTITY(1,1) NOT NULL, [PasswordResetGUID] [uniqueidentifier] NULL, [MemberID] [int] NULL, [RequestDate] [datetime] NULL, CONSTRAINT [PK_tblPasswordReset] PRIMARY KEY CLUSTERED ( [PasswordResetID] ASC )WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF) ) END GO
Why does SQL Azure not recognize the cluster key? Is my script wrong?
source share