我发现在mysql中间隔号,也就是ESC下面那颗键的作用很不一般,在使用中文作为列名时,似乎只能用间隔号才能实现
create table test(`序号` int not null);
如果改成单引号,双引号或者不用符号都不能通过
但是如果是英文列名的话,不用符号也能通过
想问一下间隔号的作用是什么
create table test(`序号` int not null);
如果改成单引号,双引号或者不用符号都不能通过
但是如果是英文列名的话,不用符号也能通过
想问一下间隔号的作用是什么
MYSQL HELP:
An identifier may be quoted or unquoted. If an identifier is a reserved word or contains special characters, you must quote it whenever you refer to it. (Exception: A word that follows a period in a qualified name must be an identifier, so it need not be quoted even if it is reserved.)
MySQL官方文档 http://dev.mysql.com/doc/refman/5.1/zh/index.html