如何使用 phpmyadmin 添加删除级联和更新限制? [英] How to add on delete cascade and on update restrict using phpmyadmin?

查看:24
本文介绍了如何使用 phpmyadmin 添加删除级联和更新限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过 phpmyadmin 用户界面在外键上添加删除级联和更新限制",而不是执行查询.

I want to add 'On delete cascade and on update restrict' on foreign keys through phpmyadmin user Interface instead of executing query.

我通常使用 Heidisql 控制面板来执行这些操作.现在我很难在 phpmyadmin 上做同样的事情.

I generally use Heidisql control panel for doing these actions. And now I'm having hard time doing the same on phpmyadmin.

有什么想法吗?

推荐答案

在您定义表结构的选项卡中,您将获得列及其属性的列表,并且在下面应该有一个关系视图"链接,它们之间打印视图"和建议表结构".

In the tab where you define the table structure, you get the list of columns and their properties and underneath that there should be a link "relation view", between "print view", and "propose table structure."

这就是你想去的地方,但你必须已经在两个表上创建了索引.此外,您可能需要确保您使用的是 mysql 的 innoDB 存储引擎.

That's where you want to go, but you have to have created the index on both tables already. Also, you might want to make sure you're using mysql's innoDB storage engine.

一张图片价值 1000 字:

Edit : An image is worth 1000 words :

这篇关于如何使用 phpmyadmin 添加删除级联和更新限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆