外键与数据库设计
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了外键与数据库设计相关的知识,希望对你有一定的参考价值。
More for me than anything else
SHOW CREATE TABLE `tablename` DESCRIBE `table` EXPLAIN SELECT ... ALTER TABLE playlist_events ADD FOREIGN KEY (playlist_id) REFERENCES playlists (id) ALTER TABLE playlists CONVERT TO CHARACTER SET utf8 ALTER TABLE tbl_name DROP FOREIGN KEY fk_symbol -- Insert data from other table INSERT INTO TestTable (FirstName, LastName) SELECT FirstName, LastName FROM Contact WHERE EmailPromotion = 2
以上是关于外键与数据库设计的主要内容,如果未能解决你的问题,请参考以下文章