Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Alter Function GetRandomNumber
(
@MaxNumber Int,
@RandomNumber Float
)
Returns Int
As
Begin
Return Convert(Int, @MaxNumber * @RandomNumber)
End
Select Rand()
Union All Select Rand()
Union All Select Rand()
Select Rand(), Rand(), Rand()
Books On Line said:Remarks
Repetitive invocations of RAND() in a single query will produce the same value.
CREATE VIEW RandomNumber
AS
SELECT RandomNumber = rand()
GO
CREATE FUNCTION RandomFloat()
RETURNS float
AS
BEGIN
RETURN (SELECT * FROM RandomNumber)
END
GO
select dbo.randomfloat(), dbo.randomfloat(), dbo.randomfloat()
select dbo.randomfloat()
union select dbo.randomfloat()
union select dbo.randomfloat()