CREATE TABLE [dbo].[tbl_AddItems](
[id] [int] IDENTITY(1,1) NOT NULL,
[ProductId] AS ('SHPLT'+right('0000'+CONVERT([varchar](10),[ID],(0)),(4)))PERSISTED NOT NULL,
CONSTRAINT PK_ProductId PRIMARY KEY CLUSTERED(ProductId),
[ProductCategory] [varchar](20) NULL,
[ProductName] [varchar](30) NULL,
[Price] [decimal](6, 2) NULL,
[ProductCode] [varchar](20) NULL,
[Descriptions] [varchar](max) NULL,
[Stock] [int] NULL,
[Discount] [int] NULL
)
CREATE TABLE [dbo].[tbl_AddImages]
(
[Id] INT IDENTITY(1,1) NOT NULL,
[ProductId] VARCHAR(10) NOT NULL,
[ImgId] [varchar](20) NULL,
[ImgPath] [varchar](100) NULL
CONSTRAINT [FK_ProductId] FOREIGN KEY([ProductId]) REFERENCES [tbl_AddItems] ([ProductId])
)
Here i want to set primary key and foreign key on my tables tbl_AddItems,tbl_AddImages
now i'm getting an error at tbl_AddImages Creation
"CREATE TABLE failed because the following SET options have incorrect settings: 'ANSI_PADDING'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations."
Anyone please help me regarding this?