How do I return random numbers as a column in SQL Server 2005?

后端 未结 12 775
误落风尘
误落风尘 2020-12-03 01:34

I\'m running a SQL query on SQL Server 2005, and in addition to 2 columns being queried from the database, I\'d also like to return 1 column of random numbers along with the

12条回答
  •  温柔的废话
    2020-12-03 02:02

    For SQLServer, there are a couple of options.
    1. A while loop to update an empty column with one random number at a time
    2. A .net Assembly that contains a function that returns a random number

提交回复
热议问题