Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TSQL solution to determine if an index exists on SQL Mobile.

Status
Not open for further replies.

Peager

Programmer
May 27, 2003
140
US
I have an application running on SQL Mobile (or lite or whatever it's called these days).

What I need to do is run an SQL query that will tell me if an index has been defined on a particular table.

I know I can do this with SQL Enterprise but how is it done on SQL Mobile?

Much thanks in advance.

Paul
 
I don't know anything about SQL Mobile, but to determine the indexes on a table using T-SQL, you would run the following command:

sp_helpindex 'YourTableNameHere'

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
George

Thanks for your response. I already know that trick. The problem is that I need to know programatically if a particular index exists so I can create it if it doesn't. There has to be some query that can be run giving the table and/or index name that would return a yes/no response. I'm just not up to speed on SQL CE.

Thanks again for your time.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top