SQLServerCentral Article

sp_msforeachdb: Improving on an Undocumented Stored Procedure

Have you ever wanted to run a query across every database on a server with the convenience of a stored procedure? If so, Microsoft provided a stored procedure to do so. It’s unreliable, outdated, and somewhat obfuscated, though. Let’s improve on it!

4.72 (43)

2016-04-15 (first published: )

15,526 reads

SQLServerCentral Article

Database Design Follies: NULL vs. NOT NULL

It sounds simple enough. Either your column will always have a value or it may not. Yet somehow such a seemingly simple decision can become a never-ending debate where database schema begins to resemble superstition and designing effective tables seems more contentious than you expected it to be.

4.38 (78)

2016-02-26 (first published: )

24,922 reads

Blogs

SQL Server In Place Upgrades

By

Good morning dear blog reader. Today’s episode is fresh from a great weekend with...

Daily Coping 27 Sep 2022

By

Today’s coping tip is take your time. Make space to just breathe and be...

Running SQL Server in Windows Subsystem for Linux (WSL)

By

I previously wrote a post on how to convert a SQL Server Docker image...

Read the latest Blogs

Forums

The Migration Tool to Use III

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Migration Tool to Use...

SSIS File System Deployments

By RonMexico

I created a package that utilizes environment variables in the configuration manager to toggle...

Create a DACPAC to only update not replace a SQL Server Database

By Weegee71

Hi there We have been creating a DACPAC from a SQL server database project...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers