Sql Server随机数
--取得当前日期select getdate()
--取得秒
select datepart(ms,getdate())*10000
--随机函数浮点型
select rand(datepart(ms,getdate())*10000)
--取出4个数字
select right(rand(datepart(ms,getdate())*10000),4)
--转化为字符串随机数
select Convert(varchar(10),right(rand(datepart(ms,getdate())*10000),4)) 进来了解下 进来了解下
进来了,就了解下 又学到东西了,这里真好。 不看不知道,看了才知道,好帖
static/image/common/sigline.gif
武动乾坤 szjys.net
页:
[1]