# {}: Is precompiled parameter to form the sql statement, to prevent sql injection.
$ {}: Value taken directly to the assembly sql statement.
E.g:
select * from employee where id = #{id}
After converted to:
select * from employee where id = ?
For this:
select * from employee where id = ${id}
After converted to:
select * from employee where id = 2
In most cases, we should use # {}.
Native jdbc does not support local placeholders we can use $ {} of values.