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: )

16,167 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: )

26,226 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,594 reads

Blogs

Friday Flyway Tips–Comparison Options

By

Recently a customer asked how they could get index changes to be captured in...

A New Word: Guiltwrights

By

giltwrights  – n. the imaginary committee of elders that keeps a running log of...

Becoming Kristyna Ferris <3

By

Hey folks, fun personal post today. A few weeks ago, I got married! My...

Read the latest Blogs

Forums

Love

By Louis Davidson (@drsql)

Comments posted to this topic are about the item Love

Drop or delete a existing partition

By Siten0308

Hello, so I was reading on partitioning a large table, Which i successfully did,...

PostgreSQL authenticated against Microsoft Active Directory

By SSRSNoob

Can I authenticate with Active Directory and get into PostgreSQL? Version: PostgreSQL 16.1 on...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers