当前位置:网站首页>Mysql——字符串函数
Mysql——字符串函数
2022-07-31 05:07:00 【m0_67390379】


???前言
友友们大家好,我是你们的小王同学???
今天给大家带来的是Mysql——字符串函数
希望能给大家带来有用的知识
觉得小王写的不错的话 麻烦动动小手 点赞?? 收藏 评论??
小王的主页:小王同学??
小王的gitee:小王同学??
小王的github:小王同学??
小王同学先创建一张emp表!


并且向emp表中添加一些sql语句!

CHARSET(str)返回字符字符集
select charset(ename)from emp;

– CONCAT 连接字符
select concat(ename,'工作是 ',job)from emp;

– INSERT(string,substring) 返回substring在string中出现的位置没有返回0
select insert ('wxz','ping')from dual
– UCASE 转化成大写
select lcase (ename) from emp

– LCASE 转化成小写
select lcase (ename) from emp

– LEFT (string2,length)从string2中的左边起取length个字符
select left(ename,2) from emp

select ename,replace(job,'MANAGER','经理')from emp
– LTRIM (string2 )RTRIM (string2 ) TRIM(string)
– 去除前端空格或后端空格
select LTRIM (' 小王教育')from DUAL;

– 以首字母小写的方式显示所有员工emp表的姓名
– 方法1
– 思路先取出 ename的第一个字符,转成小写的
– 把他和后面的字符串进行拼接输出即可
select concat(LCASE(SUBSTRING(ename,1,1)),SUBSTRING(ename,2))AS new_name from emp;
select concat(LCASE(LEFT(ename,1)),SUBSTRING(ename,2))AS new_name
from emp;

以上就是小王带给大家字符串函数得sql语句
觉得小王写的不错的话 三连奉上吧!!
码字不易
谢谢你们这么好看还关注了我!

先自我介绍一下,小编13年上师交大毕业,曾经在小公司待过,去过华为OPPO等大厂,18年进入阿里,直到现在。深知大多数初中级java工程师,想要升技能,往往是需要自己摸索成长或是报班学习,但对于培训机构动则近万元的学费,着实压力不小。自己不成体系的自学效率很低又漫长,而且容易碰到天花板技术停止不前。因此我收集了一份《java开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担。添加下方名片,即可获取全套学习资料哦
边栏推荐
- Temporal介绍
- The MySQL database installed configuration nanny level tutorial for 8.0.29 (for example) have hands
- [py script] batch binarization processing images
- Go language study notes - dealing with timeout problems - Context usage | Go language from scratch
- WPF WPF 】 【 the depth resolution of the template
- Simple read operation of EasyExcel
- Unity打灵狐者
- View source and switch mirrors in two ways: npm and nrm
- Lua,ILRuntime, HybridCLR(wolong)/huatuo热更新对比分析
- sql语句-如何以一个表中的数据为条件据查询另一个表中的数据
猜你喜欢

mysql stored procedure

从零开始,一镜到底,纯净系统搭建除草机(Grasscutter)

The input input box displays the precision of two decimal places

XSS shooting range (3) prompt to win

The monitoring of Doris study notes

【debug锦集】Expected input batch_size (1) to match target batch_size (0)

MySQL window function

Sun Wenlong, Secretary General of the Open Atom Open Source Foundation |

The MySQL database installed configuration nanny level tutorial for 8.0.29 (for example) have hands

【wpf】wpf中的那些模板之深度解析
随机推荐
visual studio 那些提高效率的快捷键,总结(不时更新)
Numpy中np.meshgrid的简单用法示例
PWN ROP
STM32 - DMA
PCL 计算点云坐标最值及其索引
Error EPERM operation not permitted, mkdir 'Dsoftwarenodejsnode_cache_cacach Two solutions
Interview | Cheng Li, CTO of Alibaba: Cloud + open source together form a credible foundation for the digital world
MySQL事务(transaction) (有这篇就足够了..)
扫雷小游戏——C语言
Unity手机游戏性能优化系列:针对CPU端的性能调优
剑指offer专项突击版第15天
Unity Fighter
Centos7 install mysql5.7
centos7安装mysql5.7步骤(图解版)
Sql解析转换之JSqlParse完整介绍
Apache DButils使用注意事项--with modifiers “public“
12 reasons for MySQL slow query
益智类游戏关卡设计:逆推法--巧解益智类游戏关卡设计
12个MySQL慢查询的原因分析
城市内涝及桥洞隧道积水在线监测系统