Tag: dml

什么是DDL和DML

你能帮我从头了解DDL和DML吗?

截断外键约束表

为什么我的群组上没有TRUNCATE ? 即使我有ON DELETE CASCADE SET我得到: 错误1701(42000):无法截断在外键约束中引用的表( mytest ,CONSTRAINT instance_ibfk_1 FOREIGN KEY( GroupID )REFERENCES mygroup ( ID )) drop database mytest; create database mytest; use mytest; CREATE TABLE mygroup ( ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY ) ENGINE=InnoDB; CREATE TABLE instance ( ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY, GroupID INT NOT NULL, DateTime […]