当前位置:网站首页>L'index des paramètres d'erreur est sorti de la plage pour les requêtes floues (1 > Nombre de paramètres, qui est 0)
L'index des paramètres d'erreur est sorti de la plage pour les requêtes floues (1 > Nombre de paramètres, qui est 0)
2022-07-03 02:57:00 【Un iris rhamnoides CD】
Voici les informations d'erreur
select * from user where uid like '%?%'
java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
at com.mysql.jdbc.PreparedStatement.checkBounds(PreparedStatement.java:3288)
at com.mysql.jdbc.PreparedStatement.setInternal(PreparedStatement.java:3272)
at com.mysql.jdbc.PreparedStatement.setInternal(PreparedStatement.java:3314)
at com.mysql.jdbc.PreparedStatement.setInt(PreparedStatement.java:3258)
at com.mysql.jdbc.PreparedStatement.setObject(PreparedStatement.java:3533)
Erreurs possibles dans les assignations précompilées :
- Mauvaise position d'affectation spécifiée ,C'est - à - dire:
parameterIndex
Erreur de paramètre, La valeur de ce paramètre est de 1C'est parti.- Nombre insuffisant d'affectations
En promettantsqlL'instruction n'a pas d'erreur, Et sans erreur lors de l'utilisation d'une affectation précompilée :
…
Ça pourrait êtresql L'épissage des caractères utilisé dans l'instruction est incorrect ,C'est comme ça que ça se passe, L'exception décrite ci - dessus s'est produite au début avec des guillemets simples .
Solutions:
Changementsql L'épissage des déclarations , C'est une petite compilation.select * from user where uid like concat('%',?,'%')
边栏推荐
- sql server 查询指定表的表结构
- Three.js本地环境搭建
- Linear rectification function relu and its variants in deep learning activation function
- Add automatic model generation function to hade
- 【Flutter】shared_ Preferences local storage (introduction | install the shared_preferences plug-in | use the shared_preferences process)
- HW-初始准备
- HW initial preparation
- Serious security vulnerabilities reported by moxa mxview network management software
- Chart. JS multitooltip tag - chart js multiTooltip labels
- Practice of traffic recording and playback in vivo
猜你喜欢
Three. JS local environment setup
Pytest (6) -fixture (Firmware)
Choose it when you decide
[translation] the background project has joined the CNCF incubator
Baidu map - surrounding search
A2L file parsing based on CAN bus (2)
[fluent] listview list (map method description of list set | vertical list | horizontal list | code example)
Opengauss database development and debugging tool guide
Do you really understand relays?
Deep learning: multi-layer perceptron and XOR problem (pytoch Implementation)
随机推荐
How to return ordered keys after counter counts the quantity
Sqlserver row to column pivot
Apple releases MacOS 11.6.4 update: mainly security fixes
open file in 'w' mode: IOError: [Errno 2] No such file or directory
Xiaodi notes
Opengauss database development and debugging tool guide
How to limit the size of the dictionary- How to limit the size of a dictionary?
Error when installing MySQL in Linux: starting mysql The server quit without updating PID file ([FAILED]al/mysql/data/l.pid
Summary of interview project technology stack
Kubernetes family container housekeeper pod online Q & A?
基于can总线的A2L文件解析(2)
用docker 連接mysql的過程
Why choose a frame? What frame to choose
The base value is too large (the error is marked as "08") [duplicate] - value too great for base (error token is'08') [duplicate]
Left connection, inner connection
"Analysis of 43 cases of MATLAB neural network": Chapter 43 efficient programming skills of neural network -- Discussion Based on the characteristics of the new version of MATLAB r2012b
疫情当头,作为Leader如何进行代码版本和需求开发管控?| 社区征文
The Linux server needs to install the agent software EPS (agent) database
HTB-Devel
Le processus de connexion mysql avec docker