CREATE [CLUSTERED| NONCLUSTERED] INDEX idxUnitCost --<-- Type of Index [CLUSTERED OR NONCLUSTERED] ON InventoryItems (UnitCost ASC) --<-- Order Inside the Parenthesis
What is wrong with this DDL for creating an index on a SQL Server CE Table?
-
30-08-2022 - |
Domanda
With this code:
command.CommandText = "CREATE TABLE InventoryItems (Id nvarchar(50) NOT NULL, PackSize smallint NOT NULL, Description nvarchar(255), DeptDotSubdept float, UnitCost float, UnitList float, UPCCode nvarchar(50), UPCPackSize smallint, CRVId int);"
command.ExecuteNonQuery();
command.CommandText = "CREATE INDEX idxUnitCost ON InventoryItems (UnitCost) ASC";
command.ExecuteNonQuery();
...I get, "There was an error parsing the query .... Token in error = ASC"
Is my "ASC" in the wrong location, or...???
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow