Create an index on a table unless it already exists
- From: Bonny <silvana.bonicelli@xxxxxxxxx>
- Date: Wed, 20 Jun 2007 10:55:04 -0000
Hi,
how can I create an index on a table unless it already exists?
In SQL SERVER it can be done through the following sql code:
-----------------------------------------------------------------------------------------------
if not exists (select * from sysindexes
where id=object_id('<table_name>') and name='<index_name>')
create index <index_name> on <table_name>(<field_names>)
---------------------------------------------------------------------------------------------------
I need to do it in SQL Mobile 2005.
Thank you in advance
.
- Follow-Ups:
- Re: Create an index on a table unless it already exists
- From: William \(Bill\) Vaughn
- Re: Create an index on a table unless it already exists
- Prev by Date: Re: odbc driver for SQL CE
- Next by Date: Very slow
- Previous by thread: Re:SQL Server support on Windows CE 6.0
- Next by thread: Re: Create an index on a table unless it already exists
- Index(es):
Relevant Pages
|
Loading