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,365 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,565 reads

Blogs

Daily Coping 27 May 2022

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Daily Coping 26 May 2022

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Seeding an Availability Group Replica from Snapshot

By

Background If you’ve been using Availability Groups, you’re familiar with the replica seeding (sometimes...

Read the latest Blogs

Forums

OLE DB provider \"SQLNCLI11\" for linked server

By EasyBoy

We have a DTS package running on one of the production server. This is...

Need to provide access to database without giving access to production

By gray6

Hoping I could find some best practice answers here: We have analysts who need...

Fill missing rows in dataset

By Ombir

I have data in table like this. I want to fill/insert the rows with...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers