CHARINDEX and PATINDEX both return the start position of a pattern in a text field. PATINDEX allows wildcards, CHARINDEX does not. Examples use AdventureWorks.
SQL SERVER – Stored Procedure – Clean Cache and Clean Buffer
DBCC FREEPROCCACHE will invalidate all stored procedure plans that the optimizer has cached in memory. Let us learn how to clean cache.
SQL SERVER – T-SQL Script to find the CD key from Registry
Need the SQL Server CD key used at install time? The undocumented xp_regread reads it straight from the registry. Log in as SA if you lack permission.
SQL SERVER – Query Analyzer Shortcuts
A handy table of Query Analyzer Shortcuts with each key combination and what it does, like CTRL+E to execute a query, plus a PDF copy you can download.






