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 6887511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:53:38+00:00 2026-05-27T05:53:38+00:00

Is it possible to create a clustered index from a create table statement in

  • 0

Is it possible to create a clustered index from a create table statement in SQL Server 2008 that is not a primary key?

The purpose of this is for a table in SQL Azure, so it is not an option for me to first create the table, and then create the clustered index on the table.

Edit: Apparently it was FluentMigrator that was causing my problems, it’s version table does not have a clustered index so it was erroring trying to create the versioning table not my table.

  • 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-27T05:53:38+00:00Added an answer on May 27, 2026 at 5:53 am

    Yes, it is possible to create a clustered index that is not the primary key. Just use a CREATE CLUSTERED INDEX statement.

    CREATE TABLE dbo.myTable (
        myTableId int PRIMARY KEY NONCLUSTERED
        myColumn int NOT NULL
    )
    
    CREATE CLUSTERED INDEX myIndex ON dbo.myTable(myColumn)
    

    Prior to version Azure SQL Database v12, you had to have a clustered index before you could insert any data to a table. As of Azure SQL Database v12, heaps (tables without a clustered index) are now supported.

    If your database was created prior to June 2016, here are the instructions for upgrading to version 12.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It is possible to create a primary key or unique index within a SQL
It's possible to create digrams in SQL Server 2000 that can be useful to
How it is possible to create clustered indexes on a view in SQL Server
Is it possible to create an InnoDB table without a Primary Key? Since InnoDB
is something like that possible ? CREATE TABLE [dbo].[T_ALERT]( [id] [bigint] NOT NULL IDENTITY(1,1),
Is it possible to create a trigger that will not be in a transaction?
We are switching from a non-clustered to a 2-node clustered MSMQ Windows Server 2008
I have a single row of data in a SQL Server table that I'm
Possible Duplicate: Function to Calculate Median in Sql Server I have a table like
Is it possible to create federated Subversion servers? As in one server at location

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.