About 51 results
Open links in new tab
  1. Create a nonclustered non-unique index within the CREATE TABLE ...

    145 It is possible to create a primary key or unique index within a SQL Server CREATE TABLE statement. Is it possible to create a non-unique index within a CREATE TABLE statement?

  2. Function-based indexes in SQL Server - Stack Overflow

    Mar 4, 2014 · It's similar to the function based index, except you're first naming the complete expression and associating it with the table (creating a computed column), and then as a separate step you …

  3. sql server - Why use the INCLUDE clause when creating an index?

    CREATE INDEX idx1 ON MyTable (Col1) INCLUDE (Col2, Col3) The INCLUDE clause is new to me. Why would you use it and what guidelines would you suggest in determining whether to create a …

  4. sql server - Multiple Indexes vs Multi-Column Indexes - Stack Overflow

    Indexes in SQL Server 2005/2008 – Best Practices, Part 1 Indexes in SQL Server 2005/2008 – Part 2 – Internals One thing to note, clustered indexes should have a unique key (an identity column I would …

  5. sql server - Generate script of All the indexes in a database - Stack ...

    Feb 1, 2012 · I want to generate a script of all the indexes in a database (Create Index). I don't want the index script along with create table script. how can we generate it in SQL Server (2005 or 2008).

  6. sql - Why use the Where clause when creating an index? - Stack Overflow

    Jun 23, 2019 · Create unique index IX_Contacts on Contacts(User_ID) Where (IsDefault=1) Says that, for each User_ID, they may have one, and only one, default contact in the Contacts table - but they …

  7. sql - Creating an index on a table variable - Stack Overflow

    May 20, 2009 · Can you create an index on a table variable in SQL Server 2000? i.e.

  8. How to create a really useful index in SQL Server?

    Jan 9, 2021 · In my experience, with tables of a few million rows, building an index from scratch takes no more than a few seconds, so the overhead argument is only valid if you have really huge tables or …

  9. SQL Server indexes - ascending or descending, what difference does it ...

    Apr 13, 2009 · 172 When you create an index on a column or number of columns in MS SQL Server (I'm using version 2005), you can specify that the index on each column be either ascending or …

  10. indexing - SQL Server index with condition - Stack Overflow

    Dec 4, 2017 · So main purpose of index is defeated.In that case we drop the index and create index on some other column/columns. Idea of Filtered index is also different than use here.Purpose of filtered …