Parameters are confusing because there are so many different “standards” for them. Parameters are used mainly because of the way the query engine works (and caches) in relational databases. Consider these two queries:
select * from authors where au_fname = 'Bob' select * from authors where au_fname = 'Fred'
When a SQL engine executes these commands, it goes through a three-step process (the absolute specifics may vary among databases):
The command is parsed into a tree form, and the object names are resolved. This step catches mistakes such as spelling the keyword SELECT incorrectly or referring to a table or column that does not exist.
The parsed tree form of the command is analyzed by the relational manager, ...