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)

You rated this post out of 5. Change rating

2016-04-15 (first published: )

15,877 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)

You rated this post out of 5. Change rating

2016-02-26 (first published: )

25,782 reads

SQLServerCentral Article

Cursor-Killing: Accessing Data in the Next Row

Cursors are considered by many to be the bane of good T-SQL. What are the best ways to avoid iterative T-SQL and to write queries that look and perform beautifully? This first part in an ongoing series of cursor-killing handles inter-row analysis.

4.86 (94)

You rated this post out of 5. Change rating

2015-12-18 (first published: )

22,568 reads

Blogs

Microsoft Announcement: Microsoft Fabric

By

Yesterday at Microsoft Build, a significant announcement took place—the introduction of Microsoft Fabric, which...

Introduction to SQL Server Query Store

By

Introduced with SQL 2016, Query Store was, probably without doubt, the most anticipated and...

Flyway with Multiple Folders

By

A customer asked about how they could organize their migration scripts in different ways...

Read the latest Blogs

Forums

You have an error in your SQL syntax; check the manual that corresponds

By yrstruly

I am having great trouble creating a data pipeline using MariaDB connector 3 with...

Availability Group database went into 'Restoring' state

By Arsh

Dear Friends, Please advise why would one of my Availability Group databases go into...

Access db

By sqlguru

Access db wanting to move  sql server, how much control does business have over...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers