An ad-hoc query is something that is not known prior to execution. Each
execution of the query might be different (both in structure and in
results). SQL Server will not be able to optimize for these queries. Regular
queries or scripts and pre-compiled blocks of SQL code (for example
procedures, triggers) that SQL Server can optimize.
Please reply to the whole group only!
"CM" <caomin111hotmail.com> wrote in message
news:%230LzRVXQDHA.2316TK2MSFTNGP12.phx.gbl...> What's the different between ad hoc and regular query or script?