SQL For .NET Programmers

Is now available as an eBook for your Kindle reader.

Get it at Amazon today!

Recent Posts
Calendar
November 2013
S M T W T F S
« Oct    
 12
3456789
10111213141516
17181920212223
24252627282930

Posts Tagged ‘random’

Random in SQL – SQL For Programmers

IMG_1382 Last week I had an interesting assignment: Given a specific record, randomly retrieve three related records from the database.

Naturally, as a programmer, I started looking for the SQL random function.  Which I found.

But even as I was searching for how to use that function, I was thinking to myself, “How am I going to structure things in such a way so as to randomly select the records once I have the function?  It isn’t like I can retrieve the records into an array and then select them out.  Am I going to have to retrieve them into a temp table?”

Read the rest of this entry »