Advertisements
Advertisements
Question
Give any two differences between Static (embedded) SQL and Dynamic SQL.
Distinguish Between
Advertisements
Solution
| Sr. no. | Static SQL | Dynamic SQL |
| 1. | In Static SQL, the database access procedure is predetermined in the statement. | In Dynamic SQL, Only at runtime can the database access be ascertained. |
| 2. | Static SQL statements run faster and more efficiently. | Dynamic SQL statements are less efficient. |
| 3. | These statements are compiled at compile time. | These statements are compiled at run time. |
| 4. | Application plan parsing, validation, optimization, and generation are compile-time activities. | Application plan parsing, validation, optimization and generation are run time activities. |
| 5. | Static SQL is used in the case of uniformly distributed data. | Dynamic SQL is used in case of non-uniformly distributed data. |
| 6. | Statements like EXECUTE IMMEDIATE, EXECUTE, PREPARE are not used. | Statements like EXECUTE IMMEDIATE, EXECUTE, PREPARE are used. |
| 7. | Static SQL is less flexible. | Dynamic SQL is highly flexible. |
| 8. | Static SQL is more swift and efficient. | Dynamic SQL is less swift and efficient. |
shaalaa.com
Notes
Students should refer to the answer according to their questions.
Is there an error in this question or solution?
