ms sql newid function

ms sql newid function

It also can be used to select random rows from specified tables like this

select top 10 from xyz

order by newID()

Above query will always return random top 10 rows from xyz table.

In asp.net, you can pass variable of type GUID to ms sql table field of type uniqueidentifier.



Tags:

MS SQL server shutdowngodaddy hosting MS SQL server configurationThis page contains secure and none secure information Do you want to display the none secure itemsDo you want to display nonsecure itemsMS Sql Random selectms sql slowms sql versionAn unhandled exception of type systemstackoverflowexception occurred in mscorlibdllMS SQL server Transaction commit rollbackMS SQL server service packMS SQL server 2005 attach databse without ldf fileMS SQL server mirroring remove end points master key

Author

My name is Satalaj, but people call me Sat. Here is my homepage: . I live in Pune, PN and work as a Software Engineer. I'm former MVP in ASP.net year 2010.
Disclaimer: Views or opinion expressed here are my personal research and it has nothing to do with my employer. You are free to use the code, ideas/hints in your projects. However, you should not copy and paste my original content to other web sites. Feel free to copy or extend the code.
If you want to fight with me, this website is not for you.
 

I'm Satalaj.