more indexes


i want 2 indexes. likes can't mssql.

i have example fields: school class number

i want school , class in index can this:

school  class  number  1      2    435  1      4    4535  1      5    265  2      1    8234  2      2    8493  4      3    943  4      2    493  4      6    934  
but how can in sql server management studio

i declare unique constraint. borrowing segio's ddl:

  create table dbo.orderrows  (   id int identity(1, 1) not null primary key   ,ordernr varchar(20) not null   ,orderrow varchar(20) not null   ,rowtotal decimal(11, 3) default 0 not null   ,constraint uq_orderrows unique(ordernr, orderrow)  );    

above under hood create unique index on column combination (ordernr, orderrow).


tibor karaszi, sql server mvp | web | blog


SQL Server  >  Transact-SQL



Comments

Popular posts from this blog

Page indexing

Top N or Bottom N filter based on a parameter