[SQL] primary index unique


Writing time : 2012-12-06 21:28:08

primary, index, unique

primary


When executing an INSERT query, in the case of a Recode that already exists, it may be necessary to perform UPDATE instead of INSERT.
In this case, it is possible to perform SELECT to check whether the corresponding RECORD exists, INSERT only if it does not exist, and UPDATE if it exists, but can also be processed with a single query that executes INSERT or UPDATE.

index


When executing an INSERT query, in the case of a Recode that already exists, it may be necessary to perform UPDATE instead of INSERT.
In this case, it is possible to perform SELECT to check whether the corresponding RECORD exists, INSERT only if it does not exist, and UPDATE if it exists, but can also be processed with a single query that executes INSERT or UPDATE.

unique


When executing an INSERT query, in the case of a Recode that already exists, it may be necessary to perform UPDATE instead of INSERT.
In this case, it is possible to perform SELECT to check whether the corresponding RECORD exists, INSERT only if it does not exist, and UPDATE if it exists, but can also be processed with a single query that executes INSERT or UPDATE.

Previous post

Next post

Other posts in the category