SQL create TABLE index createindex () Statement mssqlserver method Syntax: create [index type] index name on table name (column name) withfillfactor fill factor value 0 ~ 100go instance createnonclusteredindexix_test_tname -- create a non-clustered index ontest (tname) & nbsp; SQL statement to create a table index create index ()
Mssql server Method
Syntax:
Create [index type] index name
On Table Name (column name)
With fillfactor = fill factor value 0 ~ 100
Go
Instance
Create nonclustered index ix_test_tname -- create a non-clustered index
On test (tname) -- creates an index for the tname field of the test table
With fillfactor = 30 -- fill factor is 30%
Go
Select * from test (index = ix_test_tname) where tname = 'A'
Method
Mysql index creation syntax
Create [unioun | fulltext | spatial] index indexname [using indextype] on
Tablename (tablenamecol)
Index_col_name:
Col_name [(length)] [asc | desc]
For more details, see :-
Index.htm
Instance
Create index instance
This document creates a simple index named "personindex" in the lastname column of the person table.
:
Create index personindex
On person (lastname)
If you want to index the values in a column in descending order, you can add the reserved word desc after the column name:
Create index personindex
On person (lastname desc)
If you want to index more than one column, you can list the names of these columns in parentheses, separated by commas:
Create index personindex
On person (lastname, firstname)