mysql英文手册_mysql英文参考手册some keys

Options on the command line take precedence over values specified in option files and environmentvariables, and values in option files take precedence over values in environment variables. [2.12]

On character type columns, sorting—like all other comparison operations—is normally performed in a case-insensitive fashion.This means that the order is undefined for columns that are identical except for their case. You can force a case-sensitive sort for a column by using BINARY like so: ORDER BY BINARY col_name. [3.3.4.4]

简译:对于字符型列来说,排序是不区分大小写的。如果想让字符型列排序区分大小写可以使用BINARY,如:ORDER BY BINARY col_name

TIMESTAMPDIFF(YEAR,birth,CURDATE()) as age =》计算年龄

MONTH(birth) = MOD(MONTH(CURDATE()), 12) + 1;=》选择得到生日在下个月。MOD()进行取模运算[3.3.4.6]

You cannot use arithmetic comparison operators such as =, to test for NULL. [3.3.4.6] =>计算符号对NULL是没有任何意义的

In MySQL, 0 or NULL means false and anything else means true. The default truth value from a boolean operation is 1. =》在MySQL中,0或者NULL都是false的意思,其他的则为true。从bool运算中得到true值是用1表示

Two NULL values are regarded as equal in a GROUP BY.

When doing an ORDER BY, NULL values are presented first if you do ORDER BY ... ASC and last if you do ORDER BY ... DESC.

A common error when working with NULL is to assume that it is not possible to insert a zero or an empty string into a column defined as NOT NULL, but this is not the case. =》使用NULL一个常见的错误就是以为对声明为NOT NULL的列不能插入0或者空字符串,其实是可以的。

SQL pattern matching enables you to use “_” to match any single character and “%” to match an arbitrary number of characters (including zero characters).=>SQL正则表达式允许使用"_"来匹配任意单个字符,使用“%”来匹配任意个数字符,包括0个。[3.3.4.7]

In MySQL, SQL patterns are caseinsensitive by default.=》MySQL中正则表达式对大小写并不敏感。

SELECT * FROM pet WHERE name REGEXP '^b';

If you really want to force a REGEXP comparison to be case sensitive, use the BINARY keyword to make one of the strings a binary string.SELECT * FROM pet WHERE name REGEXP BINARY '^b';

If you want to get the interactive output format in batch mode, use mysql -t. To echo to the output the statements that are executed, use mysql -v. =》如果想在批处理模式也就是source file这种模式下的输出和登录MySQL的输出一样是表状的,那么就是用mysql -t选项。如果你想同时在输出时同时打印执行的sql,使用-v选项。

MySQL does not perform any sort of CHECK to make sure that col_name actually exists in tbl_name (or even that tbl_name itself exists).[3.6.6]=>MySQL的references tbl_name(col_name)语法不会做任何col_name是否存在的检查,即使tal_name是存在的。这里只是说references这个语法,并不是说创建外键时不检查目标表和目标列的存在.

When you insert any other value into an AUTO_INCREMENT column, the column is set to that value and the sequence is reset so that the next automatically generated value follows sequentially from the largest column value.

For a multiple-row insert, LAST_INSERT_ID() and mysql_insert_id() actually return the AUTO_INCREMENT key from the first of the inserted rows.

--column-names option that determines whether or not to display a row of columnnames at the beginning of query results. [4.2.5 ] =>这样子来说的话,--column-names这个参数在用来执行select一个表数据时还是蛮好用的。因为默认是会把列名一起导出来的

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值