Mysql:mysql cannot delete the foreign key, rename error on the./ruler/test2child to./ruler/#sql2 -298-92 (errno:152)
It used to be a bug in MySQL, but now it's just an unfriendly place in MySQL.
Examples are as follows:
mysql> ALTER TABLE
A foreign key specifies that the value of a column (or a group of columns) must conform to the values of some rows in another table. We say this is to maintain the referential integrity of the associated table.In the graphical interface, the Foreign
By default, Nginx is a multi-process run mode. Nginx and memcached are not the same, is a multi-process mode. Maximum benefits of using multi-process mode:
1. Resource independence for each process
2. No need to add a variety of cumbersome
SQL Server-constraint one, the classification of constraintsIn SQL Server, there are 3 different kinds of constraints.1. Entity constraintsEntity constraints are about rows, such as when a row appears with values that are not allowed to appear on
Creating User: Create user ' username ' [@ ' host name '] identified by ' Password ';The hostname can be empty, and the default is the% permission, which means that all hosts can connect. create USER ' jredu ' @ ' loaclhost ' identified by ' jredu '
I. Paradigm in the database:Paradigm, the English name is the Normal Form, it is the British e.f.codd (relational database ancestor) in the 70 's to put forward a relational database model, the paradigm is the basis of relational database theory,
This blog mainly focuses on the creation of keys, the creation of constraints. Modify objects and delete objects.PRIMARY KEY : The primary key is a unique identifier for each row and must contain a unique value (and therefore cannot be null).
I. Classification of constraintsIn SQL Server, there are 3 different kinds of constraints.1. Entity constraintsEntity constraints are about rows, such as when a row appears with values that are not allowed to appear on other rows, such as a primary
1. Add a field:ALTER TABLE tablename add NEW_FIELD_ID type NOT null default ' 0 ';Cases:ALTER TABLE Mmanapp_mmanmedia add appid_id integer NOT null default 372;Add primary key: alter table tabelname add new_field_id type default 0 not
From: Stairway to Database Design level 3:building Tablesauthor Joe Celko,translation: Liu Jongmao Shesheni Xu Yali Lai HuifangPresidentIs it completely new for designing and creating a database? It doesn't matter, Joe Celko, one of the most-read
Multi-table OperationFOREIGN KeyWhat is a foreign keyA foreign key refers to a column or columns that reference another table, and the referenced column should have a PRIMARY key constraint or a uniqueness constraint.Foreign keys are used to
If Table A's primary key is a field in table B, the field is called the Foreign key of Table B, table A is called the primary table, and table B is called from the table. Foreign keys are used to achieve referential integrity, and different foreign
MySQL cluster creates a foreign key, divided into four constraints: no action,restrict,cascade,set null. If Table A's primary key is a field in table B, the field is called the foreign key of B, table A is called the primary table, and table B is
Data integrityA difference between relational database systems and file systems is that the relational database itself guarantees the integrity of the stored data and does not require application control, and file systems generally need to be
The previous article simply described the requirements for foreign key constraints, and did not tell you about the referential actions of foreign key constraints. This time I'll take a look at the update operation under the FOREIGN KEY constraint.
One or three major paradigms:1. First paradigm (1NF): Each column in the data table (each field) must be the smallest unit that is not to be split, that is, the atomicity of each column;2. Second paradigm (2NF): After 1NF is satisfied, all columns
FOREIGN KEY constraints guarantee referential integrity. A FOREIGN KEY constraint restricts the range of values for a column. An example is defining a state abbreviation in a finite value set, which is another control structure--a parent tableBelow
1. Display the list of databasesshow databases; # View all current databasesShow Databases \g #以行的方式显示2. On the command line, execute the SQL statementMysql-e ' show databases '-uroot-p123456mysqlshow-uroot-p123456 # not used, just remember the one
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.