"DaveSatz" wrote ...
Quote:> Your last questions seemed to asked whether you should use Stored Procs
> SELECT. A stored procedure is just a predefined set of pre-compiled,
> code that can be executed by a variety of methods on demand. You can
> encapsulate security using SP's so that users can have rights to the SP,
> not to the underlying tables, unless you use dynamic SQL.
I guess what I was really asking was whether dynamic referred to variables
in certain positions but not in others. As an example, maybe it would make a
difference in compilation if you used a variable for a table name, but might
not make a difference if the variable represented a column name or row ID,
or if the variable appeared in a different position such as the where
If any variable in any position a stored procedure causes a situation where
compilation does not occur in advance (what I imagine everyone is referring
to as dynamic SQL), then I assume that if security is not an issue, a stored
procedure would not be necessary for a select statement.
I would appreciate if you would confirm this, or correct any false