Re:The Curse and Blessings of Dynamic SQL
by nextaccountic on Tuesday May 09, 2023 @03:48AM
(#35871330)
What about some_user has characters that need to be escaped?
[ Parent
| on HN ]
The parent article touches on this point too - both Oracle and SQL Server (and any other major db) supports parameterising values in dynamic sql. some_user would become @some_user (SQL Server) or :some_user (Oracle).
(The characters never actually get escaped with parameterisation - they are not part of the query text when it is parsed so can’t affect it - hence parameterising a value in sql query replaces the need to escape it with something much more robust.)