July 20, 2021 at 7:13 pm
I have a partition scheme created and just need to create a table using it, but i need to use syntax for adding the indexing and primary key at the same time if possible. Can this be done? "PS_Year_Partition" is my partition scheme name:
CREATE TABLE [dbo].[CallLogCommonPartitioned](
[CALL_ID] [varchar](255) NOT NULL,
[DATE] [date] NOT NULL,
[TIME] [time](0) NOT NULL,
[lead_id] [varchar](255) NULL,
[DOMAIN] [varchar](4) NOT NULL,
[SESSION_ID] [varchar](255) NULL,
[CALL_TYPE] [varchar](255) NOT NULL
)
ON PS_Year_Partition ([date]);
GO
And what about the below added into the T-SQL?:
CREATE PRIMARY KEY CLUSTERED
(
[CALL_ID] ASC,
[DATE] ASC,
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
July 21, 2021 at 8:10 pm
Thanks for posting your issue and hopefully someone will answer soon.
This is an automated bump to increase visibility of your question.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy