How do you get the field name and type of a table in SQL Server 2005? Imran Mohammed answers with sp_help and an INFORMATION_SCHEMA.COLUMNS query.
Who Changed a Server Setting in SQL Server? How to Find Out
Who changed a server setting in SQL Server? The error log records what changed and when, and the default trace adds the login, the computer and the program. Tested with one harmless change that is put back at the end.
SQL SERVER – 2008 – Get Current System Date Time
Several ways to get the current system date time in SQL Server 2008, from GETDATE to the newer functions, with a quick video on the topic.
SQL SERVER – 2008 – Find Current System Date Time and Time Offset
SQL Server 2008 adds SYSDATETIMEOFFSET, which returns the current system date time along with its time offset from GMT. One line shows how.
How to Calculate Age Correctly in SQL Server
Calculate Age in SQL Server by counting completed birthdays, not calendar years. This post compares DATEDIFF, a DATEADD correction and a compact integer version on a bike club table, handles February 29 birthdays and ends with a reusable function for age on any date.
SQL SERVER – SQL SERVER – Simple Example of Recursive CTE – Part 2 – MAXRECURSION – Prevent CTE Infinite Loop
Can you stop a recursive CTE from running forever? Yes. Use the MAXRECURSION option to limit it, and see what happens when the limit is too low.
SQL SERVER – Simple Example of Recursive CTE
A simple example of Recursive CTE in SQL Server, using AdventureWorks to walk the hierarchy of managers and employees, with each part explained.







