|
-
Dec 15th, 2003, 03:30 PM
#1
Thread Starter
Frenzied Member
Index
Hey,
Can I have a ix_Index in one table and another ix_Index in another table in SQL Server?
I get an error that the indx already exists?
Can't you have 2 indexes with the same name in different tables in SQL Server?
Thanks,
Don't anthropomorphize computers -- they hate it
-
Dec 15th, 2003, 03:33 PM
#2
Indexes are not stored 'in' the table. They're stored together. So, no, you should have different names.
-
Dec 15th, 2003, 03:34 PM
#3
Thread Starter
Frenzied Member
what's the proper naming conventions for indexes then?
Don't anthropomorphize computers -- they hate it
-
Dec 15th, 2003, 03:41 PM
#4
mendhak_indexname.

Actually, there's no as-such proper convention, but I've usually seen
something_index or index_something
-
Dec 15th, 2003, 10:42 PM
#5
Fanatic Member
I tend to include the table name and column names in my Index names, sometimes paraphrasing the table/column names if there are very many:
ix_tablename_columnname
Chris
Master Of My Domain
Got A Question? Look Here First
-
Dec 16th, 2003, 05:36 AM
#6
Hyperactive Member
You cannot have two objects with the same name.
a table and an index cannot have the same name in a single db.
-
Dec 16th, 2003, 05:37 AM
#7
Hyperactive Member
Naming convention for indexes
Naming convention for indexes
Usually it is like
TableName_nIX
where n is a number
if it is PK index then
tablename_PK
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|