<i id='EzCjI'><tr id='EzCjI'><dt id='EzCjI'><q id='EzCjI'><span id='EzCjI'><b id='EzCjI'><form id='EzCjI'><ins id='EzCjI'></ins><ul id='EzCjI'></ul><sub id='EzCjI'></sub></form><legend id='EzCjI'></legend><bdo id='EzCjI'><pre id='EzCjI'><center id='EzCjI'></center></pre></bdo></b><th id='EzCjI'></th></span></q></dt></tr></i><div id='EzCjI'><tfoot id='EzCjI'></tfoot><dl id='EzCjI'><fieldset id='EzCjI'></fieldset></dl></div>

<small id='EzCjI'></small><noframes id='EzCjI'>

  • <legend id='EzCjI'><style id='EzCjI'><dir id='EzCjI'><q id='EzCjI'></q></dir></style></legend>

        <bdo id='EzCjI'></bdo><ul id='EzCjI'></ul>
      1. <tfoot id='EzCjI'></tfoot>
      2. 除非指定了主键,否则防止从表中删除 *

        prevent delete * from table unless primary key specified(除非指定了主键,否则防止从表中删除 *)
        <legend id='F8o4t'><style id='F8o4t'><dir id='F8o4t'><q id='F8o4t'></q></dir></style></legend>

          <i id='F8o4t'><tr id='F8o4t'><dt id='F8o4t'><q id='F8o4t'><span id='F8o4t'><b id='F8o4t'><form id='F8o4t'><ins id='F8o4t'></ins><ul id='F8o4t'></ul><sub id='F8o4t'></sub></form><legend id='F8o4t'></legend><bdo id='F8o4t'><pre id='F8o4t'><center id='F8o4t'></center></pre></bdo></b><th id='F8o4t'></th></span></q></dt></tr></i><div id='F8o4t'><tfoot id='F8o4t'></tfoot><dl id='F8o4t'><fieldset id='F8o4t'></fieldset></dl></div>

              <small id='F8o4t'></small><noframes id='F8o4t'>

            1. <tfoot id='F8o4t'></tfoot>
                <bdo id='F8o4t'></bdo><ul id='F8o4t'></ul>

                    <tbody id='F8o4t'></tbody>
                1. 本文介绍了除非指定了主键,否则防止从表中删除 *的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  除非指定主键,否则我想阻止用户使用从表中删除 *,我们的团队成员之一经常使用从 table_name 中删除 *",我想防止将来发生这种情况.

                  I want to prevent user from using deleting * from table unless primary key specified, one of our team member accendently used "delete * from table_name" i want to prevent such scenarios in future.

                  推荐答案

                  Would 安全更新 对您来说可行吗?这是一个您可以在命令行、选项文件中启用的选项,或者在 SQL 代码中设置一个变量,以防止在没有 where 子句的情况下进行更新和删除,该子句包括定义要更改的行的键列.

                  Would safe updates be viable for you? This is an option you can enable on the command line, in the option file or set a variable in SQL code that prevents updates and deletes without a where clause that includes the key columns defining the rows to change.

                  在 MySQL Workbench 中,Preferences -> 中有一个设置.SQL 编辑器 ->安全更新(无限制地拒绝更新和删除).我相信这在默认情况下甚至是启用的.

                  In MySQL Workbench there is a setting in Preferences -> SQL Editor -> Safe Updates (rejects UPDATEs and DELETEs with no restriction). I believe this is even on by default.

                  这篇关于除非指定了主键,否则防止从表中删除 *的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  ibtmp1是非压缩的innodb临时表的独立表空间,通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在文件系统磁盘足够的情况下,这个文件大小是可以无限增长的。 为了避免ibtmp1文件无止境的暴涨导致
                  What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)
                  MySQL groupwise MAX() returns unexpected results(MySQL groupwise MAX() 返回意外结果)
                  MySQL SELECT most frequent by group(MySQL SELECT 按组最频繁)
                  Why Mysql#39;s Group By and Oracle#39;s Group by behaviours are different(为什么 Mysql 的 Group By 和 Oracle 的 Group by 行为不同)
                  MySQL GROUP BY DateTime +/- 3 seconds(MySQL GROUP BY DateTime +/- 3 秒)

                2. <legend id='Hd8XB'><style id='Hd8XB'><dir id='Hd8XB'><q id='Hd8XB'></q></dir></style></legend>
                        <bdo id='Hd8XB'></bdo><ul id='Hd8XB'></ul>
                          <tbody id='Hd8XB'></tbody>
                        • <small id='Hd8XB'></small><noframes id='Hd8XB'>

                          <tfoot id='Hd8XB'></tfoot>
                            <i id='Hd8XB'><tr id='Hd8XB'><dt id='Hd8XB'><q id='Hd8XB'><span id='Hd8XB'><b id='Hd8XB'><form id='Hd8XB'><ins id='Hd8XB'></ins><ul id='Hd8XB'></ul><sub id='Hd8XB'></sub></form><legend id='Hd8XB'></legend><bdo id='Hd8XB'><pre id='Hd8XB'><center id='Hd8XB'></center></pre></bdo></b><th id='Hd8XB'></th></span></q></dt></tr></i><div id='Hd8XB'><tfoot id='Hd8XB'></tfoot><dl id='Hd8XB'><fieldset id='Hd8XB'></fieldset></dl></div>