Cluster Index Key value

  • Hi all,

    I have a table which has cluster index on col1 column. If i insert 10 into my table what would be cluster index key value?Is it going to be 10 as well? How do i get cluster index key value?

    Thank you

  • The clustered index is the table.

    So whatever you insert into the table is stored in the clustered index.

    You insert the value 10, the clustered index value is 10

  • Barcelona10 (9/24/2015)


    Hi all,

    I have a table which has cluster index on col1 column. If i insert 10 into my table what would be cluster index key value?Is it going to be 10 as well? How do i get cluster index key value?

    Thank you

    Which column are you entering the value of 10 into?

    Is col1 an identity column?

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

  • tnx for reply.lets say i have 5 columns and col1 is clustered(not identity).I insert values 10,x,x,x,x .How do i get cluster index key value ?

    My assumption was that it is not guaranteed that cluster index key and inserted value would be the same.

  • If the clustered index key is Col1, and you insert 10 into column 1, then the clustered index key value for that row is 10.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thank You all

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply