Note that when you use dynamic SQL you cannot manage user security at the stored procedure level. You must grant rights to the base tables or views.
Also it is better to return only the columns you need instead of using *. The less data returned, the less stress on the system, the faster everything runs, the longer until you need more powerful equipment. Using * is sloppy programming technique.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.