Dynamic SQL

External Article

Execute Dynamic SQL commands in SQL Server

  • Article

In some applications having hard coded SQL statements is not appealing, because of the dynamic nature of the queries being issued against the database server. Because of this sometimes there is a need to dynamically create a SQL statement on the fly and then run that command. This can be done quite simply from the application perspective where the statement is built on the fly whether you are using ASP.NET, ColdFusion or any other programming language. But how do you do this from within a SQL Server stored procedure?

2016-05-03

5,701 reads

Blogs

Capturing errors and auditing in Azure SQL DB

By

Logging is a necessity in the database world, well, the entire tech world. You...

Stepping into Event Streaming with Microsoft Fabric

By

(2025-July-06) Very often, real-time, high-speed streams of events come from IoT devices, social media...

Sabbatical le Troisième: A Recharge Week

By

It’s been a week since I flew home from London and Redgate to begin...

Read the latest Blogs

Forums

The Mindset of a Database Administrator: A Love Letter to Risk Aversion

By dbakevlar

Comments posted to this topic are about the item The Mindset of a Database...

Unmasking CXPACKET and CXCONSUMER in SQL Server: What Your Execution Plan Isn’t Telling You

By Chandan Shukla

Comments posted to this topic are about the item Unmasking CXPACKET and CXCONSUMER in...

how to move all SP from one db to another db?

By water490

Hi everyone I have two db - one is test and other is archive. ...

Visit the forum

Question of the Day

Independence Day

The film independence day was released in 1996. Which of these queries returns that year is run today?

See possible answers