当前位置:网站首页>oracle之sql中like %变量%的写法
oracle之sql中like %变量%的写法
2022-07-16 04:19:00 【微微笑再加油】
orcale数据库前提下,mybatics框架,需要模糊查询拼接%的场景如下
select * from user where username like '%username%'
那需要对传递的变量进行模糊查询,则有如下两种写法
1.调用mapper接口的时,把变量用%拼接
User user= usermapper.queryUserByUserName("%+userName+%");
2.在sql中处理,使用concat函数进行拼接
//orcale中的concat函数只能对两个变量进行拼接
select * from user where username like CONCAT(CONCAT('%',#{
channelType}),'%')
边栏推荐
- Qtcpserver multithreading implementation
- [TinyML]NetAug:Network Augmentation for Tiny Deep Learning
- Sword finger offer 04 Search in two-dimensional array
- 7.15模擬賽總結
- Guess the size of the number ii[what problem does dynamic planning solve?]
- 猜数字大小II[动态规划解决什么问题?]
- Dynamic cool 404 page source code
- ORA-19625异常处理记录
- Low power test scheme of jishili multimeter
- 【深度学习】《动手学深度学习》环境配置
猜你喜欢

贝加莱PLC-更改轴任务扫描时间和周期位置下发

Problems encountered in deploying edusoho on the Intranet

singan:learning a generative model from a single natural image
![[software testing] test slang, the advice given to you by ten-year old employees](/img/69/b27255c303150430df467ff3b5cd08.gif)
[software testing] test slang, the advice given to you by ten-year old employees

Jesd204b debugging notes (practical version)

Installing the g2opy frame

Sword finger offer 42 Maximum sum of continuous subarrays

Sword finger offer 28 Symmetric binary tree
![03_ Case setup [resttemplate calls microservices]](/img/67/98814e8762e0198aa6368575678f4d.png)
03_ Case setup [resttemplate calls microservices]

AB控制器 L36ERM_2个处理器之间的通讯
随机推荐
What are MySQL's intentional shared locks, intentional exclusive locks, and deadlocks
More than 130 enterprises and 3500 developers have jointly built the root community of opengauss open source database
ACL Technology
Qimage image format summary
Sword finger offer 32 - I. print binary tree from top to bottom, breadth first search (queue)
The third day of MATLAB learning (data types, operators and various operations)
leetcode 143. 重排链表
视频处理:视频抽样
Micro, m3o micro service series (II)
2.18 haas506 2.0开发教程 - 阿里云M2M设备间通信 - 规则引擎/Topic消息路由(仅支持2.2以上版本)
Dls-42/4-4 dc110v double position relay
Sword finger offer 63 Maximum profit of stock
Why does QT creator compile so slowly?
canvas 性能优化的几种方式?
What is the master-slave replication principle of MySQL
Flutter ListView controller.animateTo 无效
Excel, how to choose the right chart?
[TinyML]NetAug:Network Augmentation for Tiny Deep Learning
Use PSSH to execute commands on multiple hosts in batches
Time consuming evaluation of image pixel values accessed by opencv, emgucv and opencvsharp pointers (with source code)