MySQL 数据库sql语句用关键字作为where条件进行筛选实例演示,mysql建表、查询字段为关键字解决方法

只要把关键字用反引号包上就好了,反引号可以通过 Tab 上的键打出来。
我用 where 这个关键字做实例。

create table key_word (`where` char(50));
insert key_word value("北京");
desc key_word;

在这里插入图片描述

select * from key_word where `where` = '北京';

在这里插入图片描述
喜欢的点个赞❤吧!

猜你喜欢

转载自blog.csdn.net/qq_38161040/article/details/108734306