---
title: "How can you create dynamic query?"  
description: "How can you create dynamic query?"  
author: "Anonymous User"  
published: 2011-05-17  
updated: 2020-09-23  
canonical: https://www.mindstick.com/interview/914/how-can-you-create-dynamic-query  
category: "cold fusion"  
tags: ["cold fusion"]  
reading_time: 1 minute  

---

# How can you create dynamic query?

Dynamic SQL is a SQL code that your program generates using variables before the SQL is executed. \
In coldfusion, CFQUERY give full provision to write all conditional logic & looping to derive the dynamic sql statement to execute. You can use dynamic SQL to accomplish tasks such as adding WHERE clauses to a search based on the fields that the user filled out on a search criteria page.

## Answers

### Answer by Anonymous User

Dynamic SQL is a SQL code that your program generates using variables before the SQL is executed. \
In coldfusion, CFQUERY give full provision to write all conditional logic & looping to derive the dynamic sql statement to execute. You can use dynamic SQL to accomplish tasks such as adding WHERE clauses to a search based on the fields that the user filled out on a search criteria page.


---

Original Source: https://www.mindstick.com/interview/914/how-can-you-create-dynamic-query

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
