Re: Creating a sqlce index in code?
From: Alex Feinman [MVP] (public_news_at_alexfeinman.com)
Date: 02/18/05
- Next message: Alex Feinman [MVP]: "Re: sqlce Select"
- Previous message:
: "Re: Simple Encryption in Compact Framework" - In reply to: mikeb: "Creating a sqlce index in code?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 17 Feb 2005 18:43:57 -0800
CREATE INDEX IX_TRACKNO_FACTORY ON TestTable ( trackno, factory )
You can add UNIQUE (create unique index) and/or sort order for columns
(ASC/DESC)
See SQL CE Books Online for more information (available if you install SQL
CE from microsoft.com)
-- Alex Feinman --- Visit http://www.opennetcf.org "mikeb" <mike@nohostanywhere.com> wrote in message news:%23tILxhVFFHA.3924@TK2MSFTNGP09.phx.gbl... > Suppose I have the table below - I'm new to sqlce and am wondering what I > need to do to add an index to the table on trackno+factory. ?? > > sqlCreateTable.CommandText = _ > "CREATE TABLE TestTable " & _ > "(" & _ > "trackno nchar (20), " & _ > "factory nchar (10), " & _ > "sealno nchar (40), " & _ > "length nchar (04), " & _ > "add_date datetime " & _ > ")" > > sqlCreateTable.ExecuteNonQuery() >
- Next message: Alex Feinman [MVP]: "Re: sqlce Select"
- Previous message:
: "Re: Simple Encryption in Compact Framework" - In reply to: mikeb: "Creating a sqlce index in code?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|