⇤ ← Revision 1 as of 2014-07-29 00:21:26
Size: 298
Comment:
|
Size: 312
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
== Dynamic SQL where == | == Dynamic SQL , conditional where == |
MySQL
Dynamic SQL , conditional where
SELECT first_name, last_name, subsidiary_id, employee_id FROM employees WHERE ( subsidiary_id = :sub_id OR :sub_id IS NULL ) AND ( employee_id = :emp_id OR :emp_id IS NULL ) AND ( UPPER(last_name) = :name OR :name IS NULL )