MySQL及Oracle中将varchar类型转换成int类型

MySQL中:

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

或者

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



Oracle中:

select to_number('123') from dual


你可能感兴趣的:(MySQL数据库,Oracle数据库)