• One more difference between EXEC and sp_executesql is that first one does not allow you to run parameterized queries.

    sp_executesql allows you to parameterize the sql and inturn helps in caching and re-use of execution plans.

    The issue related to dynamic sqls, parameterized sqls and memory is discussed in following link

    http://www.sqlservercentral.com/forum/link.asp?TOPIC_ID=11407