当前位置:网站首页>MySQL passes in list < string > to query
MySQL passes in list < string > to query
2022-07-18 04:01:00 【*๛ก(ー ̀ω ー ́ ก) 】
If you want to mysql Pass in List<String> As query criteria
List<String> list = ["1","2","3"];
String ids = "\"" + String.join("\",\"",list) + +"\"";
// After splicing, it is ""1","2","3""
select * from student where id in (${
ids})
//
select * from student where id in ("1","2","3")
Use it carefully $ Splicer , instead of # Place holder
边栏推荐
- unity工程统一管理Pico和oculus项目
- 非常全面的IReport的使用
- UNP学习笔记-第三章套接字编程
- 【C语言】静态&动态&文件通讯录(超万字)
- Dataarts studio data architecture -- a case of intelligent automation pipeline construction based on model driven
- Bitmap sign in
- LeetCode刷题
- Openharmony hidden poem application
- Unp learning notes - Chapter 3 socket programming
- Andorid studio makes happy writing numbers (timer start + frame animation)
猜你喜欢

Implementation of ZABBIX proxy active mode

McKinsey: in the next decade, the top ten technology trends will affect investment and research direction

Want to be an elite developer? Please force yourself to form these 10 habits

Trends in Plant Science | 向改善生态的植物-微生物组互作的方向育种

BufferedInputStream字节缓存输入流和缓存流的效率测试_复制文件

Quickly deploy mqtt clusters on Alibaba cloud using terraform

PD server grpc interface diagram

Google Earth Engine(GEE)——S2影像异常值

普通二本毕业五年,备战两个月,四面阿里巴巴定级P7

vulnhub Funbox: Easy (funbox3)
随机推荐
The software supply chain security risk that makes enterprise digitalization and it executives bear the brunt of the cauldron points to the north
Openharmony hidden poem application
OSPF knowledge point 1
MGRE环境下的OSPF实验
Is there a version of polardb for oracle?
Change Buffer介绍
难道双非本科就一定进不了大厂?阿里技术四面+交叉面+HR面,成功拿到offer!!
Ordinary two graduated for five years and prepared for two months. Alibaba rated P7 on all sides
APUE学习笔记-15章进程间通信
[Vuforia] 详解·高通Vuforia识别追踪3D物体/模型,Unity开发
ArkUI常见问题汇总【系列1】
UNP学习笔记-第三章套接字编程
Teach people to fish - see a field on the sap mm material display interface, how to find which field of which database table to store
vulnhub Funbox: 1
It can be understood as follows: polardb for PostgreSQL is automatically integrated without installing PostgreSQL
scroll-view 固定高度 实现触底效果
Trends in Plant Science | 向改善生态的植物-微生物组互作的方向育种
AI briefing - model integration Sam and SWA
腾讯T4架构师带你“一窥”大型网站架构的主要技术挑战和解决方案
ZCMU--1098: 查找元素