declare @s nvarchar(2000),
declare @intCount Int
问题@intCount等于几
@s就有几个0
如Set @intCount=5
Set @s='0,0,0,0,0'
不用循环可以解决吗?请教下
declare @intCount Int
问题@intCount等于几
@s就有几个0
如Set @intCount=5
Set @s='0,0,0,0,0'
不用循环可以解决吗?请教下
解决方案 »
- SQLServer的注册表项使用技巧六则[原创]
- 有关数据库的问题
- 我的机器为什么不能用sys.databases,而只能用sysdatabases? 请看
- 系统信息问题
- 那位帮我看看如下存储进程怎么写
- xp sp3 安装 sql server 2005 新问题
- 一个存储过程被设置成自动启动调用,但数据库服务器启动时却没有被执行?
- 去掉Quick Report预览中的打印功能!
- 怎样解决被零除的问题?
- 天哪!我把别人数据库的内容删掉了
- 请各位告诉我一个sql server 2005的下载地址吧, sql server 2005 能和sql server 2000同时装到一台机器上吗?
- 分页过程调用问题 在线等
declare @s nvarchar(2000)
declare @intCount Int
set @intCount=5
select @s=replicate(',0',@intCount)
select stuff(@s,1,1,'')0,0,0,0,0
declare @intCount Intwhile @intCount>0
select @s=isnull(@s+',','')+'0',@intCount=@intCount-1
select @s