[Sybase] Foreigh Key/Index column

alter table SSQLquery drop constraint SSQLquery_1925867665 (queryName) REFERENCES SSQLqueryEx(queryName)
alter table SSQLquery drop foreign key SSQLquery_1925867665 (queryName) REFERENCES SSQLqueryEx(queryName)

alter table SSQLquery add foreign key (queryName) REFERENCES SSQLqueryEx(queryName)





If  there are updates to the index field(posId) of table "trade" in the sql script, actually it does not comply with current sql standard:

Prerequisites to update index field of a table:

1. The table has no constraint on the index.
2. Index field is unique.

For table "trade", the table has no constraint, but the its index field is not unique, so we can not update the index field(posId), btw, there is no error message for such operation.


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章