Guest_imported
New member
- Jan 1, 1970
- 0
It seems that when regardless of how you define a primary key, the field order always ends up to be alphabetical.
For example if you define the PK as:
ALTER TABLE PKTest
ADD CONSTRAINT PKTest_PK
PRIMARY KEY (ColumnC, ColumnA, ColumnB);
When you check the ColumnPosition in the dbc.indices table, the order will always be alphabetic:
ColumnName ColumnPosition
---------- --------------
ColumnA 1
ColumnB 2
ColumnC 3
So, the question is: Is there any way to prevent this from happening?
For example if you define the PK as:
ALTER TABLE PKTest
ADD CONSTRAINT PKTest_PK
PRIMARY KEY (ColumnC, ColumnA, ColumnB);
When you check the ColumnPosition in the dbc.indices table, the order will always be alphabetic:
ColumnName ColumnPosition
---------- --------------
ColumnA 1
ColumnB 2
ColumnC 3
So, the question is: Is there any way to prevent this from happening?