在sql中将varchar型转换成int型再进行排序

 在sql server中

select * from KH_Class order by convert(int,px)

 

在oracle中

select * from KH_class order by cast(px as int)

 

posted @ 2012-11-03 10:27  分飞  阅读(6091)  评论(0编辑  收藏  举报