EXEC with an EXEC
Is i开发者_如何学运维t possible to have an EXEC within an EXEC in SQL?
e.g. EXEC('EXEC ...')
In SQL Server, yes. try:
EXEC ('EXEC sp_helpdb')
or
EXEC ('EXEC (''EXEC sp_helpdb'')')
Yes. With an exec statement you can call any statement you could write into a Management Studio query batch including another exec statement.
精彩评论