sqlt-sqladhoc-queries

Terminology for Intermediate to Advance SQL


I've found that I need to use T-SQL quite frequently (and sometime inventively) at work and I'm trying to take my T-SQL skills to the next level.

I've seen some queries (such as the ones in the stored procedure mentioned here) which allow you to abstract over tables and (potentially, although I'm not sure) other DB objects. Is there a name for queries of this type? Or queries which extend beyond the basics of SQL?

I'm hoping for anything as simple as keywords for research but links and resources would be awesome!

Thanks


Solution

  • When you build a query into a string and the execute that string, this is referred to as dynamic SQL

    I'd highly recommend you read the excellent The Curse and Blessings of Dynamic SQL article.