以下针对mysql5.7(持续更新中):
- Use of an unqualified * with other items in the select list may produce a parse error. To avoid this problem, use a qualified tbl_name.* reference
- It is not permissible to refer to a column alias in a WHERE clause, because the column value might not yet be determined when the WHERE clause is executed
- Remove leading and/or trailing spaces: UPDATE tbl_name SET col=trim(col)
-
If you do not use columns from all tables named in a query, MySQL stops scanning any unused tables as soon as it finds the first match. In the following case, assuming that t1 is used before t2 (which you can check with EXPLAIN), MySQL stops reading from t2 (for any particular row in t1) when it finds the first row in t2:SELECT DISTINCT t1.a FROM t1, t2 where t1.a=t2.a;
-
MySQL UPDATE Statement 字段值没有不同,不会更新记录