问题描述
- sql 语句中字符类型的转换问题,在线等!!!急!!!
- select 'http//'+ID+'.html' as LINK from A
ID的字符类型是bigint的,出现错误提示:“从数据类型 varchar 转换为 bigint 时出错。”
求解决语法!!!
解决方案
select 'http//'+convert(varchar(20)ID)+'.html' as LINK from A
解决方案二:
select 'http//'+cast t(ID as varchar(50))+'.html' as LINK from A
时间: 2024-12-07 15:07:15