Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7004367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:11:25+00:00 2026-05-27T21:11:25+00:00

I have a table that is partitioned by TRANSACTION_DATE_TIME. Table has a column: ID.

  • 0

I have a table that is partitioned by TRANSACTION_DATE_TIME.

Table has a column: ID.

I want to create a unique index for ID on partition scheme as:

CREATE UNIQUE NONCLUSTERED INDEX [IX_ID_ON_PS_DATETIME] ON [CRD].[TRANSACTION] 
(
    [ID] ASC
) ON [PS_DATETIME_WEEKLY]([TRANSACTION_DATE_TIME])

but SQL says “Partition column for a unique index must be a subset of index key”.

I really don’t need TRANSACTION_DATE_TIME column in this index.

How can I create the index without using TRANSACTION_DATE_TIME column?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:11:26+00:00Added an answer on May 27, 2026 at 9:11 pm

    You have two choices: you create a NON-partitioned index, or you MUST include the partitioning key in a partitioned index:

    • Non-partitioned index

      CREATE UNIQUE NONCLUSTERED INDEX [IX_ID_ON_PS_DATETIME] ON [CRD].[TRANSACTION] 
      (
          [ID] ASC
      ) ON PRIMARY
      

    OR

    • Partitioned index that includes the partitioning key

      CREATE UNIQUE NONCLUSTERED INDEX [IX_ID_ON_PS_DATETIME] ON [CRD].[TRANSACTION] 
      (
          [ID] ASC,
          TRANSACTION_DATE_TIME
      ) ON [PS_DATETIME_WEEKLY]([TRANSACTION_DATE_TIME])
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a partitioned table that belongs to tablespace report . I want to
I have a mysql database table that I want to partition by date, particularly
I have a table that contains tasks and I want to give these an
I have a table that has redundant data and I'm trying to identify all
I have a table that has an insert trigger on it. If I insert
I have a table that essentially looks like this: CREATE TABLE myTable ( id
I have a table that I would like to partition, but I don't know
I have a table that is partitioned by month (partmonth int). The stored proc
I have a column in a non-partitioned Oracle table defined as VARCHAR2(50); the column
i have sql table which has partitions. I recently created one partition. Even if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.