当前位置:网站首页>[database] written interview database
[database] written interview database
2022-06-21 15:37:00 【Wind chime Nai】
Title Description
Write a SQL Query to fix the name , So that only the first character is capitalized , The rest are lowercase .
Topic link
Fix the name in the table
answer :
select user_id,
CONCAT(Upper(left(name,1)),Lower(substr(name,2))) name
from users
order by user_id
explain
1.SQL Medium concat function
- Used to join two strings
select concat(first,second) as name from table_name;
2.left() function
- Extract multiple characters from the left side of the string ;
select row_name,left(row_name,2) as a from table_name
3.upper(s) Functions and ucase(s) function
- The string s All alphabetic characters in are converted to capital letters
4.lower(s) Functions and lcase(s) function
- The string s All alphabetic characters in are converted to lowercase letters
select upper(name) as name from table_name
5.substr(str,pos,len) function
- str from pos Position begins to intercept , Intercept len Characters
6.substr(str,pos)
- function str from pos From the beginning to the end
select substr(str,1) as name from table_name
边栏推荐
- Telnet batch test (I): pit between telnet graceful stop and firewall
- Leetcode: number of good subsets (backtracking + state compression +dfs + pruning)
- 100% troubleshooting and analysis of Alibaba cloud hard disk
- New project template of punctual atom F103 based on firmware library
- Counter attack of flour dregs: MySQL 66 questions, 20000 words + 50 pictures!
- C multithreading
- [Yugong series] February 2022 wechat applet -app Networktimeout of JSON configuration attribute
- ABP Framework 5.3.0 版本新增功能和变更说明
- ‘maxflow‘ has no attribute ‘Graph‘
- Best practice | how to use Tencent cloud micro build to develop enterprise portal applications from 0 to 1
猜你喜欢

For the first time in China, Tsinghua and other teams won the wsdm2022 only best paper award, and Hong Kong Chinese won the "time test Award"

Retrieve the compressed package password
![[go] goroutine pool](/img/0c/4e78c59f9b4f963035c911cee3d62d.jpg)
[go] goroutine pool

Select everything between matching brackets in vs Code - select everything between matching brackets in vs Code

MNIST model training (with code)
![[leetcode] sum of two numbers - go language solution](/img/b8/d40cfe3efeedd816c5b81a1c939bd7.jpg)
[leetcode] sum of two numbers - go language solution
Counter attack of flour dregs: MySQL 66 questions, 20000 words + 50 pictures!

So many statistical charts? This visualizer is great~~
![In 2021, China's deposit balance continued to grow, and the balance of RMB and foreign currency deposits reached a record high [figure]](/img/23/652f596091dde97031a27bdbccdd0f.jpg)
In 2021, China's deposit balance continued to grow, and the balance of RMB and foreign currency deposits reached a record high [figure]

Basic concepts of database
随机推荐
Metric win computer application
‘maxflow‘ has no attribute ‘Graph‘
[Yugong series] February 2022 wechat applet -app Subpackages and preloadrule of JSON configuration attribute
我不太想在网上开户,网上股票开户安全吗
What is a naked cat
[Yugong series] February 2022 wechat applet -app Networktimeout of JSON configuration attribute
微服务架构带来的分布式单体
Retrieve the compressed package password
ConnectionOptions. Username attribute definition
我的Debug之路1.0
Idea restart
Phantom star VR product details 32: Infinite War
H2O brings AI master NLP technology to enterprises
What is the server room
Build an efficient and scalable result cache
Je ne veux pas ouvrir un compte en ligne.
So many statistical charts? This visualizer is great~~
What is the confirmation date for the scheduled redemption of financial products?
Mysql5.7 add SSL authentication
[go] goroutine pool