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
What is dependency injection in simple words?
What is boolean method?
What is the use of list in c#?
What is property c#?
Why are strings in c# immutable?
Is inheritance possible in c sharp?
Can constructor be private c#?
What does readonly mean in c#?
Do events have return type c#?
What is the base class for array types?
What are generations and how are they used by the garbage collector?
Is linkedhashset synchronized?
How to block a class from being inherited further?
Can a struct inherit from an interface in c#?
Explain why do I get an error (cs1006) when trying to declare a method without specifying a return type?