How do you add a column that fills in the current datetime when a row is inserted? A sample table and a column with a default value that does it for you.
Weekday Logic That Works Under Any DATEFIRST Setting
Make weekday logic independent of DATEFIRST with a normalized offset or a known Monday, then test every date in a full year.
SQL SERVER – TRIM Function to Remove Leading and Trailing Spaces of String – SQL in Sixty Seconds #040 – Video
SQL Server has no TRIM function, and calling it gives error Msg 195. This SQL in Sixty Seconds video shows how to remove leading and trailing spaces without it.
Designing a Date Dimension
A date dimension makes reporting calendars explicit with fiscal periods, holidays, weekdays, and a repeatable SQL Server build script.
SQL SERVER – Difference Between CURRENT_TIMESTAMP and GETDATE() – CURRENT_TIMESTAMP Equivalent in SQL Server
Is there a difference between CURRENT_TIMESTAMP and GETDATE()? No. One is ANSI SQL and the other is the T-SQL version, and both return the same value.
A Calendar Table With Holidays for Date Math
Build a calendar table with weekdays, fiscal months, and American holiday flags, then count working days and find useful date boundaries.






