当前位置:网站首页>mysql varcahr 转 int
mysql varcahr 转 int
2022-06-29 03:26:00 【sayyy】
varcahr 转 int
CAST() 和 CONVERT() 函数均可将 varcahr 转 int 。
select CAST('123' as SIGNED);
select CONVERT('123', SIGNED);
示例1:
select '123' > '23';
select 123 > '23';
select cast('123' as SIGNED)> '23'; /*与此结果相同:select 123 > '23';*/
示例2:按照排序值(varchar类型)从大到小排序
select * from dictData order by CAST(sort as SIGNED) desc;
边栏推荐
- The method of exporting packages of all components from existing PCBs in Altium Designer
- 图扑软件智慧能源一体化管控平台
- Set up nexus service
- The continued movement of Jerry's watch [chapter]
- Etcd教程 — 第六章 Etcd之核心API V3
- Requirements analysis specification and requirements specification
- Provide ideas in old texts
- 恢复二叉搜索树[根据题意模拟->发现问题->分析问题->见招拆招]
- Gartner's "voice of customers" has the highest score, and the user experience has become a major breakthrough for China's database
- Faster memcpy alternatives- faster alternative to memcpy?
猜你喜欢

Matlab exercises - image drawing exercises

FortiGate firewall configuration log uploading regularly

如何理解MySQL的索引?

Web APIs high order functions - dark horse programmers

問題——adb shellerror: insufficient permissions for device: verify udev rules.
![[flutter topic] 66 diagram basic constraints box (I) yyds dry goods inventory](/img/8b/55a43383e1cb6b37231dba980c7b11.jpg)
[flutter topic] 66 diagram basic constraints box (I) yyds dry goods inventory

Tortoise does not display a green Icon
![Synchronous movement state of Jerry's watch [chapter]](/img/58/a7e73aa32c15ccc7c506d521ca2917.jpg)
Synchronous movement state of Jerry's watch [chapter]

How to understand MySQL indexes?

FPGA (VIII) RTL code IV (basic circuit design 1)
随机推荐
[leetcode daily question] number of schemes to reconstruct a tree
2022-2028 global pneumatic test probe industry survey and trend analysis report
Farrowtech's wireless sensor adopts the nanobeacon Bluetooth beacon technology of orange group Microelectronics
map,set用pari作为key值,如何定义
Etcd教程 — 第六章 Etcd之核心API V3
Same tree [from part to whole]
Solve the problem that the cursor flashes after clicking a point when measuring the distance in Allegro
目前市面上增额终身寿险利率最高的产品是哪个?
二叉树的锯齿形层序遍历[分层遍历方式之一 -> 前序遍历+level]
恢复二叉搜索树[根据题意模拟->发现问题->分析问题->见招拆招]
设备监理师证书含金量怎样?值得考吗?
FortiGate firewall configuration log uploading regularly
Potential learning C language - pointer explanation (Advanced)
SSH login without password
Web APIs 高阶函数 丨黑马程序员
Getting started with testing - integration testing
Laravel, execute PHP artist migrate and report an error alter table `users`add unique `users_ email_ unique`(`email`))
SSH无密码登陆
PAT甲级 A1057 Stack
逆序对对数计算,顺序对对数计算——归并排序