Oracle uses on delete cascade and on delete set null to create a foreign key. In this section, we introduce the default creation method of oracle when creating a foreign key constraint, when the referenced data is deleted, it cannot be deleted. This
This section describes how to use the default oracle creation method when creating foreign key constraints. When you delete referenced data, the data cannot be deleted, this gives us more flexible options in oracle9i, however, we use the on delete
FOREIGN KEY constraints The meaning of a child table: If a candidate key is not found in the parent table, the insert/update is not allowed on the child tableWhat foreign key constraints mean to the parent table: when update/delete on a parent table
The meanings of the Cascade, no action, Restrict, and set null foreign key constraints in Mysql to the sub-table: If NO candidate key is found in the parent table, the description of the parent table of the insert/update foreign key constraint on
Reprinted from: http://blog.163.com/inflexible_simple/blog/static/1676946842011616102543931/ FOREIGN key constraint meaning for child table: If a candidate key is not found in the parent table, INSERT/UPDATE&NBSP is not allowed on the child
Most of the data is written as follows:
No actionIf you try to delete or modify a row, and the row's key is referenced by the foreign key in the existing row of another table, an error is generated and the delete/update statement is rolled
Analysis and functions of MySql foreign key constraints on CASCADE, set null, RESTRICT, and empty types
MySql foreign key constraints: NULL, RESTRICT, no action, CASCADE, set null, and other types of analysis and interpretation.
Master table,
First, Cascade WaySynchronize update/delete out a matching record of a child table when Update/delete records on the parent tableSecond, SET NULL modeSet the column of the matching record on the child table to NULL when the record is update/delete
1. Cascade WaySynchronize update/delete out a matching record of a child table when Update/delete records on the parent table2. Set NULL modeSet the column of the matching record on the child table to NULL when the record is update/delete on the
. Cascade WaySynchronize update/delete out a matching record of a child table when Update/delete records on the parent table. Set NULL modeSet the column of the matching record on the child table to NULL when the record is update/delete on the
The main table, from the table "MYSQL"//http://my.oschina.net/cart/blog/277624 empty, RESTRICT, no action delete: From the table record does not exist, the main table can be deleted. Delete from table, Main table unchanged update: The primary table
. Cascade ModeSynchronize update/delete out a matching record of a child table when Update/delete records on the parent table. Set Null methodSet the column of the matching record on the child table to NULL when the record is update/delete on the
Cascade, no action, Restrict, set null, cascaderestrict in MySQL foreign key settingsAttribute meanings in MySQL foreign key settings:Cascade ModeWhen updating/deleting records in the parent table, synchronize update/delete matching records in the
The meaning of the properties in the MySQL foreign key setting:Cascade WaySynchronize update/delete out a matching record of a child table when Update/delete records on the parent tableSet NULL modeSet the column of the matching record on the child
In some cases, you need to set the null value in the PreparedStatement, this time if you also use to set the specific type of method, such as Setint (1,null), the program will mercilessly report the null pointer exception, so you need to do is to
Turn: http://www.cnblogs.com/yidianfeng/archive/2011/02/24/1964148.html
MySQL has two common engine types: MyISAM and InnoDB. Currently, only the InnoDB Engine type supports foreign key constraints. The syntax for defining foreign key constraints
MySQL foreign key details, MySQL key details
Recently, when I was studying Hibernate, I was always confused by foreign keys. Moreover, my MySQL foreign key learning is not very solid, so in order to better master Hibernate and MySQL, therefore, I
ConceptKeyword: foreign key, also called FOREIGN KEY constraint!If a field of entity A is just pointing to the primary key of another entity B, then the field of entity A is called a foreign key;So, simply put, a foreign key is a field in this table
Recently in learning Hibernate, always by the foreign key to make a brain, and, their own MySQL foreign key learning is not very solid, so in order to better master hibernate, MySQL, so, in the online search some learning MySQL to build foreign keys
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.