SQL Server > Query

Random GUID string in SQL Server

How to get a random unique value from SQL Server?


To get a random unique value in SQL Server, we use NEWID function.

SELECT NEWID()

Every execution of the above stamen gives a new unique value.

 Views: 7602 | Post Order: 54



Write for us






Hosting Recommendations