select * from gyzd_yysinfo order by cast(yysid as SIGNED INTEGER)

或者

select * from gyzd_yysinfo order by cast(yysid as UNSIGNED INTEGER)

mysql varchar类型转换int类型的更多相关文章

  1. mysql varchar类型转换int类型找出最大值

    (1) 不严谨的,最简单的 select MAX(字段名 + 0) from 表名; (2) 使用函数实现 select MAX(cast(字段名 as SIGNED INTEGER)) from 表 ...

  2. MySQL varchar和char类型

    varchar和char是两种最主要的字符串类型.不幸的是,很难精确地解释这些值是怎么储存在磁盘和内存中的,因为这根存储引擎的具体实现有关.下面的描述假设使用的存储引擎是InnoDB或者MyISAM. ...

  3. java获取MySQL自动的int类型的Id

    @Resource(name = "dashboardTemplate") protected JdbcTemplate systemJDBCTemplate; //这个是Dao里 ...

  4. string类型转换int类型

    C++转换形式(C++11): int main(int argc, char* argv[]) { std::"; std::string str2 = "3.14159&quo ...

  5. mysql varcahr转int类型

    cast(yysid as SIGNED INTEGER)

  6. MYSQL浮点型转int类型

    cast('3.15926' as signed) cast(浮点型 as signed)

  7. mysql varchar integer

    MySQL 中将 varchar 字段转换成数字进行排序 - MySQL - 大象笔记 https://www.sunzhongwei.com/order-by-varchar-field-which ...

  8. MySQL 数据类型转换

    版权个人所有,欢迎转载如转载请说明出处.(东北大亨) http://www.cnblogs.com/northeastTycoon/p/5505523.html 网络越来越达到所以带来的好处不容置疑. ...

  9. MySQL类型转换 使用CAST将varchar转换成int类型排序

    --使用CAST将varchar转换成int类型排序 select distinct(zone_id) from guild_rank_info order by CAST(zone_id as SI ...

随机推荐

  1. 正则同时获取a标签里的href,text 2项

    Regex regex2 = new Regex(@"<a[^>]+href=\s*(?:'(?<href>[^']+)'|""(?<hre ...

  2. web 调试工具docker的安装使用

    1.   weinre 工具 docker run -d -p 8080:8080 beevelop/weinre 2. vorlonjs(不支持https)  docker run --name v ...

  3. c# Dictionary字典类如何使用

    Dictionary<string, string> openWith = new Dictionary<string, string>(); //添加元素 openWith. ...

  4. 微信开发 api 需要 https 服务器

    微信开发 api 需要 https 服务器 先建一个环境,本地的 https 服务器. 以下这篇不错,很完整. https://zhuanlan.zhihu.com/p/23640321

  5. bzoj1018[SHOI2008]堵塞的交通traffic——线段树

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1018 巧妙的线段树.维护矩阵四个角的连通性. 考虑两个点连通的可能路径分成3部分:两点左边. ...

  6. 坑爹的AMH

    坑爹的 AMH的配置文件在这里: nginx 配置文件1:/usr/local/nginx-generic-1.6/conf/nginx.conf nginx 配置文件2:/home/wwwroot/ ...

  7. PhpStorm 2017.3 版本在 Mac 系统 macOS High Sierra 版本 10.13.3 中运行很卡顿

    最近升级了系统,发现PHPStorm 运行一会儿就卡顿起来了,按网上的方法加大内存配置也是没效果: 运行一会儿照样卡顿,接着一会儿就要内存溢出了挂掉了: 想着最近只有升级过操作系统,并没有升级JDK等 ...

  8. python 多线程要点

    要点整理 多线程 #coding=utf-8 import threading from time import ctime,sleep def music(func): for i in range ...

  9. Eclipse中创建新的Spring Boot项目

    本文转载自:http://blog.csdn.net/clementad/article/details/51334064 简单几步,在Eclipse中创建一个新的spring Boot项目: 1.E ...

  10. (转)Java调用SQL Server的存储过程详解

    本文转载自:http://dev.yesky.com/128/8088128.shtml 1使用不带参数的存储过程 使用 JDBC 驱动程序调用不带参数的存储过程时,必须使用 call SQL 转义序 ...