当前位置:网站首页>SQL query statement parameters are written successfully
SQL query statement parameters are written successfully
2022-07-03 00:02:00 【CSDN Q & A】
public void test(@RequestBody Manager requestManager){ // This requestManager What's in it is (name=123,password=123) String sql = "select * from manager where name=? and password=?"; // I want it to be like this "select * from manager where name=123 and password=123"; But the parameters inside are obtained, not written }
Take the answer :
int name=123;
int password=123;
String sql="select * from manager where name='"+name+"' and password='"+password+"';
Can you try it , I haven't tried , The middle is ' "+ +" '
边栏推荐
- CADD课程学习(4)-- 获取没有晶体结构的蛋白(SWISS-Model)
- Go basic data type
- Digital collection trading website domestic digital collection trading platform
- Interface automation coverage statistics - used by Jacobo
- RTP 接发ps流工具改进(二)
- JDBC Exercise case
- 流媒体技术优化
- Sourcetree details
- Pytorch里面多任务Loss是加起来还是分别backward?
- Interface switching based on pyqt5 toolbar button -2
猜你喜欢
Highly available cluster (HAC)
接口差异测试——Diffy工具
[Verilog tutorial]
Open Source | Wenxin Big Model Ernie Tiny Lightweight Technology, Accurate and Fast, full Open Effect
Chinatelecom has maintained a strong momentum in the mobile phone user market, but China Mobile has opened a new track
一文掌握基于深度学习的人脸表情识别开发(基于PaddlePaddle)
基于OpenCV实现口罩识别
How much do you know about synchronized?
List of major chip Enterprises
实用系列丨免费可商用视频素材库
随机推荐
How QT exports data to PDF files (qpdfwriter User Guide)
vim区间删行注释
Leetcode DP three step problem
How much do you know about synchronized?
Three solutions to frequent sticking and no response of explorer in win11 system
非路由组件之头部组件和底部组件书写
Highly available cluster (HAC)
Happy Lantern Festival, how many of these technical lantern riddles can you guess correctly?
QT 如何将数据导出成PDF文件(QPdfWriter 使用指南)
1380. Lucky numbers in the matrix
JSON数据传递参数
返回二叉树中最大的二叉搜索子树的大小
【OJ】两个数组的交集(set、哈希映射 ...)
JSON data transfer parameters
CADD课程学习(4)-- 获取没有晶体结构的蛋白(SWISS-Model)
Dishes launcher small green program and directory management (efficiency tool)
What experience is there only one test in the company? Listen to what they say
[error record] the flutter reports an error (could not resolve io.flutter:flutter_embedding_debug:1.0.0.)
Use redis to realize self increment serial number
Digital twin visualization solution digital twin visualization 3D platform