当前位置:网站首页>数据库查询语句SQL中like、%、-的区别
数据库查询语句SQL中like、%、-的区别
2022-06-26 01:36:00 【new 杨海波】
%百分号通配符:表示任何字符出现任意次数(可以是0次)
SQL 语句选取 name 以字母 "k" 结尾的所有客户:
SELECT * FROM Websites WHERE name LIKE '%k';
执行输出结果:
下划线通配符:表示只能匹配单个字符,不能多也不能少,就是一个字符.
查询员工名称以员工1开头,且后面只有一个字符的人
select * from #tmpEmployee where EmpName like '员工1_'
like操作符: LIKE作用是指示mysql后面的搜索模式是利用通配符而不是直接相等匹配进行比较.
SQL 语句选取 name 以字母 "G" 开始的所有客户:
SELECT * FROM Websites WHERE name LIKE 'G%';
执行输出结果:
边栏推荐
- 基于邻接表的广度优先遍历
- Eureka registration information configuration memo
- Here comes the official zero foundation introduction jetpack compose Chinese course!
- 【机器学习】基于多元时间序列对高考预测分析案例
- 如何在 ggplot2 中向绘图中添加表格
- Depth first traversal of Graphs
- Agent challenge - "Olympic running"
- 基于 ovarian 数据集 进行生存分析
- 2022-06-25: given a positive number n, it means that there are tasks 0~n-1. Given an array of length N, time[i] means the time when task I is completed. Given a two-dimensional array matrix, matrix[j]
- MySQL必须掌握4种语言!
猜你喜欢
A high-frequency interview question from a large factory: tell me about the solution of high and low interface idempotence? Solutions are attached.
One year's work
Breadth first traversal based on adjacency matrix
OA process editing
SQL column value to row value (unpivot)
Cvpr2022 𞓜 future transformer with long-term action expectation
Cow sequencing problem
程序员的八年工资变动,令网友羡慕不已:你一个月顶我一年工资
Cross server SQL connection configuration
ARM流水线如何提高代码执行效率
随机推荐
# 云原生训练营毕业总结
leetcode 300. Longest increasing subsequence (medium)
喜讯 | 祝贺Apache Linkis(incubating) 社区新增5位Committer
Multi surveyor Gongshu Xiao sir_ The solution of using websocket error reporting under working directory
WPF window centering & change trigger mechanism
Agent challenge - "Olympic running"
Which securities company should I choose to open an account online? Is it safe to open an account online?
哪个证券公司手机股票开户更好更安全?
基于 ovarian 数据集 进行生存分析
How to check and cancel subscription auto renewal on iPhone or iPad
How to improve code execution efficiency with arm pipeline
2022年挖财商学院证券开户安全嘛?
PyQt theme
How do I take a screenshot of the iPad? 7 ways to take quick screenshots of iPad
Chapter I: essential information collection of penetration test
How to open a stock account? Is it safe to open an account online?
Is it safe to trade stocks with a compass? How does the compass trade stocks? Do you need to open an account
在同花顺网上开户安全吗?如何网上开一个券商账户
Cow sequencing problem
[image filtering] image filtering system based on Matlab GUI [including Matlab source code 1913]