当前位置:网站首页>大约SQL现场“这包括”与“包括在”字符串的写法
大约SQL现场“这包括”与“包括在”字符串的写法
2022-07-05 21:40:00 【全栈程序员站长】
大家好,又见面了,我是全栈君,今天给大家准备了Idea注册码。
1、字段查找表值“这包括”方法一字符串的所有记录
如果表中有一name场,查询name这包括“乔 – 史密斯”所有记录。能够写sql:
Stirng strsql=”SELECT * FROM 表名 WHERE name LIKE ’%”+”张三”+”%’”;
2、查询某字段值“包括于”某个字符串的全部记录的方法
假设查询表中name字段包括于字符串“张三是个好学生”的全部记录,能够这样写sql:
String strsql=”SELECT * FROM 表名 WHERE INSTR(’张三是个好学生’,name)>0″;
就可以查询。记录中的name字段值中包含:张、三、是、个、好、学、生、张三、……所有记录。
注意:以上sql字符串请仔细阅读半宽全角符号。
版权声明:本文博客原创文章,博客,未经同意,不得转载。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/117578.html原文链接:https://javaforall.cn
边栏推荐
- Incentive mechanism of Ethereum eth
- GCC9.5离线安装
- Selenium finds the contents of B or P Tags
- ESP32
- Summary of data analysis steps
- What are the requirements of UL 2043 test for drive housing in the United States?
- Pointer parameter passing vs reference parameter passing vs value parameter passing
- Realize the function of verifying whether the user has completed login when browsing the page
- Three components of openpyxl
- Simple interest mode - evil Chinese style
猜你喜欢
Arcgis\qgis no plug-in loading (no offset) mapbox HD image map
华为快游戏调用登录接口失败,返回错误码 -1
KingbaseES V8R3集群维护案例之---在线添加备库管理节点
事项研发工作流全面优化|Erda 2.2 版本如“七”而至
递归查询多级菜单数据
MySQL 千万数据量深分页优化, 拒绝线上故障!
Uni app Bluetooth communication
Yolov5 training custom data set (pycharm ultra detailed version)
2.2 basic grammar of R language
场景化面试:关于分布式锁的十问十答
随机推荐
张丽俊:穿透不确定性要靠四个“不变”
KingbaseES V8R3集群维护案例之---在线添加备库管理节点
Exercise 1 simple training of R language drawing
Incentive mechanism of Ethereum eth
JS common method encapsulation
Selenium gets the verification code image in DOM
MMAP
让开发效率飞速提升的跨端方案
EBS Oracle 11g 克隆步骤(单节点)
matlab绘制hsv色轮图
Aitm 2-0003 horizontal combustion test
Simple interest mode - lazy type
Dictionary tree simple introductory question (actually blue question?)
sql常用语法记录
ArcGIS栅格重采样方法介绍
張麗俊:穿透不確定性要靠四個“不變”
js常用方法封装
【日常训练】729. 我的日程安排表 I
regular expression
Analysis and test of ModbusRTU communication protocol