当前位置:网站首页>About the writing method of SQL field "this includes" and "included in" strings
About the writing method of SQL field "this includes" and "included in" strings
2022-07-05 21:43:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm the king of the whole stack , I've prepared for you today Idea Registration code .
1、 Field lookup table values “ This includes ” Method a string of all records
If there is one in the table name site , Inquire about name This includes “ Joe – Smith. ” All records . Be able to write sql:
Stirng strsql=”SELECT * FROM Table name WHERE name LIKE ’%”+” Zhang San ”+”%’”;
2、 Query the value of a field “ Included in ” The method of all records of a string
Suppose the query table name Fields are included in the string “ Zhang San is a good student ” All the records of , Can write like this sql:
String strsql=”SELECT * FROM Table name WHERE INSTR(’ Zhang San is a good student ’,name)>0″;
You can check . In record name The field value contains : Zhang 、 3、 ... and 、 yes 、 individual 、 good 、 learn 、 raw 、 Zhang San 、…… All records .
Be careful : above sql Please read the half width full angle symbol carefully .
Copyright notice : This article is an original blog article , Blog , Without consent , Shall not be reproduced .
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/117578.html Link to the original text :https://javaforall.cn
边栏推荐
- 2022-07-03-CKA-粉丝反馈最新情况
- The primary key is set after the table is created, but auto increment is not set
- Pointer parameter passing vs reference parameter passing vs value parameter passing
- 2.2.3 output of documents
- Implementing Lmax disruptor queue from scratch (IV) principle analysis of multithreaded producer multiproducersequencer
- 初级软件测试必问面试题
- Some things make feelings nowhere to put
- Establishment of terminal security capability verification environment and penetration test records
- 事项研发工作流全面优化|Erda 2.2 版本如“七”而至
- Teach yourself to train pytorch model to Caffe (I)
猜你喜欢

matlab绘制hsv色轮图

Teach yourself to train pytorch model to Caffe (I)

Parker驱动器维修COMPAX控制器维修CPX0200H

Scenario interview: ten questions and ten answers about distributed locks

阿里云有奖体验:用PolarDB-X搭建一个高可用系统

How can Huawei online match improve the success rate of player matching

华为云ModelArts文本分类–外卖评论
![R language [data management]](/img/41/b89bb8794c06280e58988e1c1a5e02.png)
R language [data management]

MMAP

Parker driver maintenance COMPAX controller maintenance cpx0200h
随机推荐
The primary key is set after the table is created, but auto increment is not set
Interview questions for basic software testing
What should I do to prepare for the interview algorithm position during school recruitment?
MMAP学习
Interviewer: will concurrent programming practice meet? (detailed explanation of thread control operation)
Emotional analysis of wechat chat records on Valentine's day based on Text Mining
MySQL deep paging optimization with tens of millions of data, and online failure is rejected!
华为联机对战如何提升玩家匹配成功几率
Simple interest mode - lazy type
uni-app 蓝牙通信
datagrid直接编辑保存“设计缺陷”
大约SQL现场“这包括”与“包括在”字符串的写法
Uni app Bluetooth communication
2.2 basic grammar of R language
基于 Ingress Controller 在集群外访问 Zadig 自测环境(最佳实践)
Li Kou ----- the maximum profit of operating Ferris wheel
Two ways to realize video recording based on avfoundation
regular expression
KingbaseES V8R3集群维护案例之---在线添加备库管理节点
力扣------经营摩天轮的最大利润