text转换成int-1.1

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/caishu1995/article/details/83930579
select convert(int,convert(varchar(20),列名)) from 表名

    如果要把text转换成int,不能直接转的,要把text转成char,然后再转成int类型

猜你喜欢

转载自blog.csdn.net/caishu1995/article/details/83930579