An SQL statement has two basic stages within
Compilation is the work done while the statement is prepared. Compilation is composed of the following stages: parsing, binding, optimization, and code generation.
Execution is the actual evaluation of the statement.