欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

MySQL可以使用斜线来当字段的名字

程序员文章站 2024-03-31 14:03:52
今天发现mysql可以使用斜线来当字段的名字,这是个意外的发现。 复制代码 代码如下: create table `op_day` ( `id` int(11) not n...
今天发现mysql可以使用斜线来当字段的名字,这是个意外的发现。
复制代码 代码如下:

create table `op_day` (
`id` int(11) not null auto_increment,
`date` date not null default '0000-00-00' comment '日期',
`income` int(11) not null default '0',
`total` int(11) not null default '0',
`income/total` double(11,2) not null default '0.00',
primary key (`id`),
key `unique` (`date`)
) engine=innodb auto_increment=0 default charset=utf8;