Use ALTER LOGIN in SQL Server 2005 to disable or enable any login, including ‘sa’, and to rename the SA account to a name that is hard to guess.
SQL SERVER – Collate – Case Sensitive SQL Query Search
Make a SQL Query Search case sensitive: add COLLATE Latin1_General_CS_AS to the WHERE clause so ‘casesearch’ matches one row instead of all four.
SQL SERVER – SET ROWCOUNT – Retrieving or Limiting the First N Records from a SQL Query
SET ROWCOUNT limits how many rows a query returns, and SQL Server stops once it has them. See the syntax, how SET ROWCOUNT 0 resets it, and when it is ignored.
SQL SERVER – Random Number Generator Script – SQL Query
Random Number Generator. There are many methods to generate random numbers in SQL Server.
Method 1: Generate Random Numbers (Int) between Rang
SQL SERVER – Replication Keywords Explanation and Basic Terms
A quick reference of Replication keywords I wrote for Jr. DBAs: publisher, subscriber, distributor, publication and article, each explained in plain words.
SQL SERVER – Restrictions of Views – T SQL View Limitations
SQL Server views come with many rules, like ANSI_NULLS and QUOTED_IDENTIFIER being on. My list of view limitations, corrected with help from Ben Taylor.
SQL SERVER – Query to Retrieve the Nth Maximum Value
A query to retrieve the Nth Maximum Value from a table with a correlated subquery. Replace Employee and Salary with your own table and column, then set N.





