Create an index on a table unless it already exists



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

.



Relevant Pages

  • Re: Access DB on a Pocket PC device
    ... I also found where SQL Mobile is part of VB.2005. ... SQL client on my Pocket PC. ... SSMS gets installed with SQL Server Developer. ...
    (microsoft.public.pocketpc.developer)
  • Re: SQL Mobile on desktop through IIS
    ... The current licensing model is that SQL Mobile is free for SQL Server ... you are using SQL Mobile on a SQL Server ... > Server Mobile edition install, so we can skip the Express stuff above? ...
    (microsoft.public.sqlserver.ce)
  • Re: SQL Mobile 2005, SQL Sever 2005, IBuySpyDelivery2005
    ... Looking for a SQL Server replication book? ... > The SQL Mobile .DLL files are accessible on HTTPS on the IIS (hosted on ... a request to send data to the computer running IIS has failed. ...
    (microsoft.public.sqlserver.replication)
  • Re: Accessing Mobile SQL databases in VB2005. Do you need SQL Mgt.
    ... that connection. ... > reference to Microsoft SQL Mobile. ... >> under the default settings SQL Server does not allow remote connections. ...
    (microsoft.public.pocketpc.developer)
  • Re: ACCELERATING STORE PROCEDURE
    ... original raw data is inserted with bcp utility, ... (possible Cartesian join) ... Steps 5 - 17 might be replaced with a SQL statement something like ... One of the rules of efficient programs is to use just SQL code (no PL/ ...
    (comp.databases.oracle.server)

Loading