当前位置:网站首页>mysql进阶(八)排序问题方案探究
mysql进阶(八)排序问题方案探究
2022-07-19 09:18:00 【InfoQ】
一、前言
mysql
order by
varchar
SELECT * FROM gb_country_isdcode ORDER BY isdcode asc;
asc
asc
int
isdcode + 0
SELECT * FROM gb_country_isdcode ORDER BY (isdcode+0) asc;
INT
二、中文排序
mysql
order by
UTF8
order by
GBK
SELECT * FROM table_name ORDER BY CONVERT(column_name USING gbk);
convert
gb2312
convert
gb2312
gb2312
三、延伸阅读 MySQL外键在数据库中的作用
MySQL
MySQL
MySQL
3.1 MySQL外键的作用
3.2 建立外键的前提
foreign key(列名)
references <外键表名>(外键列名)
3.3 事件触发限制
on delete
on update
cascade
restrict
set Null
set Default
no action
create table temp(
id int,
name char(20),
foreign key(id) references outTable(id) on delete cascade on update cascade);
MySQL
边栏推荐
- Druid configuration and monitoring
- QIODevice
- Scratch judge leap year electronic society graphical programming scratch grade examination level 4 true question and answer analysis June 2022
- Before autumn recruitment, you must read these 8 papers on the recommendation system! [attach thesis materials]
- 【Mamba】conda速度慢?
- Common construction methods and example appreciation of STL pair
- Use of Evo assessment tools
- Kmeans handwriting implementation and sklearn interface
- C explanation of message dialog box based on MessageBox class
- 从工程师到技术leader思维升级
猜你喜欢
亚马逊、Lazada、Shopee、速卖通、eBay、Wish测评自养号运营知识——环境搭建技术详解
Tencent celebrities share | Tencent alluxio (DOP) landing and Optimization Practice in the financial scene
[Hongke news] Hongke electronics officially established a partnership with Weka
Develop those things: how to solve the memory leak in the conversion between go and C type?
Three application functions of digital sand table popular science
【附下载】爆破神器之超级弱口令检查工具使用
Web3将如何改变人来的未来?
Hackers crack gambling website vulnerabilities and "collect wool" 100000 per month
[Network Research Institute] Microsoft warns against large-scale aitm phishing attacks against more than 10000 organizations
Notepad++ software installation tutorial
随机推荐
The SQL seen here will be truncated. Is there any way to see the complete SQL?
解决:配置、路径完全没错 gateway就是访问不了
P1087 [noip2004 popularity group question 3] FBI tree
NFT game interoperability: technology is not a roadblock
LNMP环境, 网站无法访问
Discussion on segment tree · number of ordinary segments | number of multiplicative segments | chairman tree
Unity实战问题-WebGL问题集锦-下篇
Before autumn recruitment, you must read these 8 papers on the recommendation system! [attach thesis materials]
Why psp22 is important to Polkadot ecosystem
File path of QGIS development plug-in
Feign入门之快速实战
Idea delete comments for code
Detailed explanation of feign custom configuration
Feign的自动装配以及熔断降级
Output of STL Vector
为什么独立站卖家喜欢做电子邮件营销?原来转化率能提高这么多!
Driud 配置问题
Develop those things: how to solve the memory leak in the conversion between go and C type?
Docker安装常用软件-Redis
Common construction methods and example appreciation of STL pair