Forum Discussion

TheYellow's avatar
TheYellow
Copper Contributor
Feb 05, 2024

How can I declare a variable and use it on the same select for the next column

How can I set the same values in column1 and column2. Thanks!   DECLARE @Value FLOAT  SET @Value = 1000.0 + floor(10000 * RAND(convert(varbinary, newid()))) ;WITH cte AS (   SELECT ROW_NUMBER()...

Resources