There are two ways to write SQL: Static SQL, which gets the job done in most cases, and the second one is Dynamic SQL for the rest of the complex stuff.
- In a static SQL statement, most of the statement is hard-coded like table names and Column names. This part of the statement can not be changed at runtime.
- The only information that can be specified at runtime values in the WHERE clause of the SQL statement using host variables.
- The access plan for a static SQL is generated as soon as code is compiled.