Monday, January 20, 2014

Select Random Rows from SQL Server DB Table


Wanted to select random rows from a table for some analysis. Found this.

 SELECT * FROM TABLENAME
  WHERE (ABS(CAST(
  (BINARY_CHECKSUM
  (COLUMNNAME, NEWID())) as int))
  % 100) < 1

SOLID Principle

S.O.L.I.D stands for: When expanded the acronyms might seem complicated, but they are pretty simple to grasp. S - Single-responsiblity...