distal-attribute
distal-attribute
distal-attribute
distal-attribute

in absence of PRIMARY key, use UNIQUE key (if available) for record updates

User, date Message
Written by leeoniyaMoney, Euro
3 years ago
Category: Feature discussion
13 posts since Fri, 26 Mar 10
i noticed if there is no primary key, every column is used in the WHERE clause for the record updates. i think if any unique key exists in the table, it can be used like a primary key.

minor, but thought i'd mention it.
Written by ansgar
3 years ago
4783 posts since Fri, 07 Apr 06
This is already the case. When you see all columns in an UPDATE there is
- neither primary nor unique key
- or you selected not all columns from the key
- or one or more columns in the UNIQUE key allows NULLs, which turns the unique key non-unique
Written by leeoniyaMoney, Euro
3 years ago
13 posts since Fri, 26 Mar 10
yup, NULLs were allowed in the unique column.
 

Please login to leave a reply, or register at first.