由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - M$ SQL Random number
相关主题
SQL Server 问题 -- 怎样 UPDADATE 才快how to compare two schemas to look for missing indices
SSIS package存放问题T-SQL 问题
PB SQL语句的简单问题create linked server problem, please help
how to do this Database operation as timea Store Procedure question...
Dynamic SQL的弱问题请教:'now' 的时间是怎么实现的
请教一个求职面试题:如何写一个SQL query求表中对角线的和SSIS: execute SQL task failed on Insert statements
SQL Server 2005 Exec( )SQL Server怎么查为什么store procedure跑的慢?
问Jackrun, Beijing等大侠performance问题Recompile SQL Server Store procedure
相关话题的讨论汇总
话题: rand话题: loop话题: random话题: sql话题: seed
进入Database版参与讨论
1 (共1页)
a*******t
发帖数: 891
1
I am using RAND() in a loop and it is giving the same numbers
Is it because the loop executes too fast and RAND() uses system time as seed?
I've tried to use the loop counter as seed but that doesn't help
if I use "waitfor delay 00:00:01" than I get different random numbers....
but it's not pratical because it'll take days to run what I want to do...
How do I get RAND() to work correctly in a loop?
a*******t
发帖数: 891
2
hum... I must have done something wrong last time... today the rand() runs
ok in a loop, not giving same value anymore...
1 (共1页)
进入Database版参与讨论
相关主题
Recompile SQL Server Store procedureDynamic SQL的弱问题
error of executing SQL query of string concatenation (转载请教一个求职面试题:如何写一个SQL query求表中对角线的和
问个问题SQL Server 2005 Exec( )
一道PL/SQL题问Jackrun, Beijing等大侠performance问题
SQL Server 问题 -- 怎样 UPDADATE 才快how to compare two schemas to look for missing indices
SSIS package存放问题T-SQL 问题
PB SQL语句的简单问题create linked server problem, please help
how to do this Database operation as timea Store Procedure question...
相关话题的讨论汇总
话题: rand话题: loop话题: random话题: sql话题: seed