Please implement the following FOREIGN KEY and PRIMARY KEY syntax simplifications... VALIDATE { INDEX index-name | [ INDEX ] FOREIGN KEY role-name | [ INDEX ] PRIMARY KEY } ON [ owner.]object-name } ...in the FROM clause index hints WITH and FORCE INDEX: FROM table-expression, ... table-expression : table-name | ... table-name : ... [ WITH ( hint [...] ) ] [ FORCE INDEX ( index-name ) ] hint : table-hint | index-hint index-hint : NO INDEX | INDEX ( [ PRIMARY KEY | FOREIGN KEY ] index-name [, ...] ) [ INDEX ONLY { ON | OFF } ] Currently, you have to remember/look up/figure out what the primary and foreign key index names... hint: they are NOT the same as the CONSTRAINT names. |
Until now I wasn't aware that the PRIMARY KEY and FOREIGN KEY syntax that was added for hints required the specification of the index name as well. I would agree that we could make this simpler. We'll look at doing exactly that. |
Just to clarify (I had to read this several times - possibly due to a "lack of coffee"...): You are suggesting a simplification for the FROM CLAUSE (i.e. to allow to specify a PK without an index name and a FK with its role-name instead of an index-name), and you are taking the simplified syntax from the VALIDATE INDEX statement, right?
Exactly. (and now I have to keep typing to make the comment long enough)
Once understood, I second that proposal:)