Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
wick2020
Starting Member
1 Post |
Posted - 2007-12-20 : 14:22:57
|
On one of those common interview question lists, there is the question:How do you know which index a table is using?The two answers that I've found are:SELECT * FROM user_constraints--andSELECT TableName,IndexName FROM user_constraintsBoth of these return the error:Server: Msg 208, Level 16, State 1, Line 1Invalid object name 'user_constraints'.Is this because I'm using the free version of 2000(MSDE)?If so, what is the right answer for this version?-Thanks  |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-12-20 : 15:21:26
|
| Do you mean how to find out indexes on a table? Use sp_helpindex if so. User_constraints is not built-in object. |
 |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2007-12-21 : 11:24:28
|
| As well as sp_helpindex , you can also view the Execution Plan - to see which ones are actually used at run timeJack Vamvas--------------------Search IT jobs from multiple sources- http://www.ITjobfeed.com |
 |
|
|
|
|
|