Your new database sits in the default location and keeps growing. Here is how to move the MDF and LDF database files to another disk or drive.
Gapless Invoice Numbers That Restart Every Year
Finance hates a missing invoice number. A small counter table and one short transaction keep the numbers gapless and restart them each year.
SQL SERVER – Order By Numeric Values Formatted as String
A column holds alphanumeric values that start with a number, and ORDER BY sorts them as text. Here is how to sort the rows by the Numeric part instead.
Merging Overlapping Date Ranges Into Continuous Periods
Use running end dates when merging overlapping ranges, choose boundary rules, and return continuous periods without losing nested intervals.
FileTable: Files You Can Open in Explorer and Query in T-SQL
Set up FileTable prerequisites, create a Windows-accessible file namespace, query stored file metadata, and compare simpler path storage.
Audit Columns From Day One: CreatedAt, UpdatedAt and Who Changed It
Add audit columns with UTC timestamps and trusted change identities, maintain updates in procedures, and know when history is needed.
A Multi-Tenant Schema With a TenantId Column: Keys, Indexes and Safety
Design a multi-tenant schema with composite keys, tenant-first indexes, trusted session context, and row-level security checks.







