Monday, June 17, 2013

MS SQL:Create Index (Transact-SQL)

An index can be created before there is data in the table. Relational indexes can be created on tables or views in another database by specifying a qualified database name.

Refer  notes from: http://msdn.microsoft.com/en-us/library/ms188783.aspx

Sample:
create index PARAMETER on TABLE (COLUMN)



CREATE INDEX SHP_ID_CREATE_DATE
ON C.SHOPPER (CREATE_DATE)


CREATE INDEX ORDER_CREATE_DATE
ON E.ORDERS(CREATE_DATE)


.