关岭县人民政府网,服务器cpu性能排行,wp8论坛
--生成300个8位不重复纯数字随机数
declare @i int=0; declare @j int; declare @qnum int=300; --生成随机数的数量 set nocount on create table #temp_table(num int) while(@i<@qnum) begin select @j = cast( floor(rand()*(99999999-10000000)+10000000) as int) if(not exists(select num from #temp_table where num=@j )) begin insert #temp_table (num) values (@j) set @i+=1; end end select distinct num from #temp_table drop table #temp_table
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
数据库SQL---数据库、基本表、视图、索引的定义、修改、删除
在 Azure CentOS VM 中配置 SQL Server 2019 AG - (上)
在 Azure CentOS VM 中配置 SQL Server 2019 AG - (下)
网友评论