MySQL Views in Navicat - How to Define a "Primary Key"?

Often, when I define a view in Navicat, I get the following message:

xxx does not have a primary key. Updates to this table will be performed using the following pseudo-operator: UPDATE xxx SET ModifiedFieldsAndValues ​​WHERE AllFieldsAndOldValues ​​LIMIT 1

Obviously, to view the view , not the update ) I use only my views. But I'm curious:

Is there a way to define a "primary key" or "unique index" in a view?

+5
source share
1 answer

it is implied that the view uses indexes and primary keys of the base table. You can change the semantics of how they are inserted and updated when using them through views, playing with the CHASK CASCADING options

See Updatable and Plugin Views

0
source

All Articles