what is dynamic sql

Answer Posted / nilesh

Dynamic SQL enables you to write programs that reference
SQL statements whose full text is not known until runtime.
Before discussing dynamic SQL in detail, a clear definition
of static SQL may provide a good starting point for
understanding dynamic SQL. Static SQL statements do not
change from execution to execution. The full text of static
SQL statements are known at compilation, which provides the
following benefits:

Successful compilation verifies that the SQL statements
reference valid database objects.
Successful compilation verifies that the necessary
privileges are in place to access the database objects.
Performance of static SQL is generally better than dynamic
SQL.
Because of these advantages, you should use dynamic SQL
only if you cannot use static SQL to accomplish your goals,
or if using static SQL is cumbersome compared to dynamic
SQL. However, static SQL has limitations that can be
overcome with dynamic SQL. You may not always know the full
text of the SQL statements that must be executed in a
PL/SQL procedure. Your program may accept user input that
defines the SQL statements to execute, or your program may
need to complete some processing work to determine the
correct course of action. In such cases, you should use
dynamic SQL.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is deadlock in c#?

507


How many types of collections are there in c#?

483


Can interface inherit class in c#?

491


What is exe in c#?

498


Contrast System.String and System.Text.StringBuilder classes?

525






how to create crystal reports give one detail example(i want to view age category report) please give suitable example in my small knowledge

1629


Difference between StackPanel and RelativePanel ?

576


What is single dimensional array in c#?

502


Can you declare a field readonly?

542


How do you escape a character?

489


What is ildasm.exe used for?

534


What do you mean by synchronous and asynchronous operations?

475


How to put assembly in gac?

545


What is the difference between constants and read-only?

477


Can hashset contain duplicates c#?

467