DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Create A Udf That Returns A Random Number.
// description of your code here
create view vRandom as select rand() * 10 r GO CREATE FUNCTION udfGetRandomNumber() returns int as begin return (select r from vRandom); end go select dbo.udfGetRandomNumber() from sysobjects