在左边加个零怎么实现? select right('00'+cast(字段名 as varchar(2)),2) from 表 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select right('0'+cast(字段名 as varchar(2)),2) from 表 declare @你的变量set @你的变量=1select right(100+@你的变量,2) select right('00'+cast(字段名 as varchar(2)),2) from 表 select right('0'+cast(字段名 as varchar),2) from tablename declare @n int,@nstr varchar(10)select @n=2select @nstr=convert(varchar(10),@n)print case when len(@nstr)=1 then '0'+@nstr else @nstr end 求个SQL语句 xin 7 下安装 sql server 2008 distinct 问题 50分求c#代码 更改了计算机名,sql 2005不能更新了! 大力同志请进 SQL达人请进,这回我把问题说清楚些 我在SQL2000下开发的ASP用到了数据库,在SQL7下如何附加上? 我想学数据库编程,如何入手?????? 數據庫備份求救。。。。。 请教触发器的问题! 如何将记录转为字段名??
set @你的变量=1select right(100+@你的变量,2)
select @n=2
select @nstr=convert(varchar(10),@n)
print case when len(@nstr)=1 then '0'+@nstr else @nstr end