Retrieving Table And Function In A Procedure

This is a query which will help to retrieve all the tables and functions used in a store procedure, even if the query is a dynamic one.

SELECT As suspected_dependencies
FROM   sys.procedures
  JOIN sys.all_sql_modules
    ON all_sql_modules.object_id = procedures.object_id
  JOIN sys.objects
    ON <>
   AND all_sql_modules.definition LIKE '%' + + '%'
WHERE = <Procedure Name>