Dynamic SQL

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

Don’t be afraid of No

By

How many times have you been afraid to hear “No”? We have all been...

Spark .NET - Spark ML TF-IDF

By

Spark ML in .NET for Apache Spark Spark is awesome, .NET is awesome, machine...

Daily Coping 7 Jul 2020

By

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

Read the latest Blogs

Forums

compare row data

By abhas

Hi , I am having table in below format. I want to calculate difference...

Adding a Calculated Column in R

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Adding a Calculated Column in...

Better Laptop Life

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Better Laptop Life

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers