Marty

  • Interests: Playing Guitar, Music Theory

Blog Post

SQL Server STUFF

The STUFF function in SQL Server is one of those little gems that is very under-used but when needed can be a real handy utility – at least that’s...

2022-01-10

21 reads

Blog Post

OPENJSON and CROSS APPLY

OPENJSON is pretty central to manipulating JSON documents in T-SQL. As we’ve seen, we can use a default schema that will return metadata about the JSON document or we...

2020-06-24 (first published: )

6,811 reads

Blog Post

OPENJSON and an Alias

Using Aliases in T-SQL is very common. We can alias both Tables (FROM clause) and Columns (SELECT clause) and some other things too. It’s all pretty fundamental to writing...

2020-06-08

284 reads

Blog Post

OPENJSON and an Alias

Using Aliases in T-SQL is very common. We can alias both Tables (FROM clause) and Columns (SELECT clause) and some other things too. It’s all pretty fundamental to writing...

2020-06-08

9 reads

Blogs

App-Consistent MongoDB Snapshots Across Multiple Pure Storage FlashArrays

By

Introduction When you’re running MongoDB at scale with data distributed across multiple Pure Storage...

PASS: Quantum Computing Slides

By

If you're an attendee at the PASS Data Community Summit this year, there are...

A New Word: Dead Reckoning

By

dead reckoning– v. intr. finding yourself bothered by somebody’s death more than you would...

Read the latest Blogs

Forums

Filtered Indexes: The Developer’s Secret Weapon in SQL Server

By Chandan Shukla

Comments posted to this topic are about the item Filtered Indexes: The Developer’s Secret...

Is Data Modeling Common?

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Is Data Modeling Common?

Getting The Database Name

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Getting The Database Name

Visit the forum

Question of the Day

Getting The Database Name

I run this code to connect to SQL Server 2022 from the command line.

sqlcmd -S localhost -E
At the command line, I run these two commands:
SELECT ORIGINAL_DB_NAME()
GO
What is returned?

See possible answers