sqlserver中产生随机字符,随机数

SELECT REPLACE(NEWID(),'-','')


select replicate(char(cast(rand()*1000 as int)%26+97)
+char(cast(rand()*1000 as int)%26+97)
+char(cast(rand()*1000 as int)%26+97)
+char(cast(rand()*1000 as int)%26+97)
+char(cast(rand()*1000 as int)%26+97),(cast(rand()*100 as int)%6)+1)


http://q.cnblogs.com/q/45469/


http://blog.163.com/zangyunling@126/blog/static/1646245052010717115023216/

posted on 2013-11-27 18:05  白马酒凉  阅读(187)  评论(0编辑  收藏  举报

导航