Counter of Festivals

Ashok Blog for SQL Learners and Beginners and Experts

Tuesday, 4 August 2015

Static SQL VS Dynamic SQL and Diffrence between Static SQL and Dynamic SQL

Static SQL VS Dynamic SQL:

Static SQL is SQL statements in an application that do not change at runtime and, therefore, can be hard-coded into the application. Dynamic SQL is SQL statements that are constructed at runtime; for example, the application may allow users to enter their own queries. Thus, the SQL statements cannot be hard-coded into the application.

Static SQL provides performance advantages over dynamic SQL because static SQL is preprocessed, which means the statements are parsed, validated, and optimized only once.


Static SQL  is compiled and optimized prior to its execution; dynamic SQL is compiled and optimized during execution.

No comments:

Post a Comment