zoukankan      html  css  js  c++  java
  • MySQL参数

    1. sql_safe_updates

    官方解释如下:

    If set to 1, MySQL aborts UPDATE or DELETE statements that do not use a key in the WHERE clause or a LIMIT clause. (Specifically, UPDATE statements must have a WHERE clause that uses a key or a LIMIT clause, or both. DELETE statements must have both.) This makes it possible to catch UPDATE or DELETE statements where keys are not used properly and that would probably change or delete a large number of rows. The default value is 0.

    默认为0,如果设置为1,则delete操作和update操作必须带有where子句,且where子句中的列必须是key或primary key,如果表设计的时候本来就没有设置key或primary key,则delete和update操作将不被允许,如果表设计的时候设置了key或者primary key,但where指定的是其它列,delete和update操作同样不被允许。

  • 相关阅读:
    BZOJ 3522 Hotel
    BZOJ 1864 三色二叉树
    396595
    CodeForces
    CodeForces
    CodeForces
    E. 数字串
    算术基本定理总结
    Cyclic Nacklace 杭电3746
    Period
  • 原文地址:https://www.cnblogs.com/ivictor/p/5146373.html
Copyright © 2011-2022 走看看