当前位置:网站首页>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)
- RuntimeError: no valid convolution algorithms available in CuDNN
- Open source | Wenxin big model Ernie tiny lightweight technology, which is accurate and fast, and the effect is fully open
- Leetcode relaxation question - day of the week
- 開源了 | 文心大模型ERNIE-Tiny輕量化技術,又准又快,效果全開
- Sourcetree details
- List of major chip Enterprises
- Linux 下安装 redis
- Improvement of RTP receiving and sending PS stream tool (II)
- JDBC practice cases
猜你喜欢
How difficult is it to be high? AI rolls into the mathematics circle, and the accuracy rate of advanced mathematics examination is 81%!
PR FAQ, what about PR preview video card?
2022 latest and complete interview questions for software testing
附加:token;(没写完,别看…)
Ideal car × Oceanbase: when the new forces of car building meet the new forces of database
Happy Lantern Festival, how many of these technical lantern riddles can you guess correctly?
What if win11 can't turn off the sticky key? The sticky key is cancelled but it doesn't work. How to solve it
開源了 | 文心大模型ERNIE-Tiny輕量化技術,又准又快,效果全開
[Verilog tutorial]
Additional: token; (don't read until you finish writing...)
随机推荐
Interface switching based on pyqt5 toolbar button -2
VIM interval deletion note
【OJ】两个数组的交集(set、哈希映射 ...)
MySQL Foundation
Interface difference test - diffy tool
Returns the root node of the largest binary search subtree in a binary tree
Brief introduction to common sense of Zhongtai
MFC文件操作
35页危化品安全管理平台解决方案2022版
MATLAB signal processing [Q & a notes-1]
開源了 | 文心大模型ERNIE-Tiny輕量化技術,又准又快,效果全開
Interpretation of new plug-ins | how to enhance authentication capability with forward auth
Realization of mask recognition based on OpenCV
Matlab 信号处理【问答笔记-1】
Request and response
How can cross-border e-commerce achieve low-cost and steady growth by laying a good data base
67 page overall planning and construction plan for a new smart city (download attached)
JDBC practice cases
67页新型智慧城市整体规划建设方案(附下载)
MFC gets the current time