Error: Twitter did not respond. Please wait a few minutes and refresh this page.
- 11,984 hits
cultivate passion for everything else that goes on around programming
Given a request to randomly inter-change the values of some columns in a SQL Server table, I used the following SQL script:
We update the table Table1 using random values from the same table. The random row is selected by using this T-SQL:
The where clause is used to assure that the update takes a new random row for each row that will be updated.