Does it allow us to put @Variable as table name in SQL Statemnt, cause I want to build a Stored Proc allow me to call any table by the parameter, but I meet a error.
If you want to find out more about the technique, its called 'Dynamic SQL' (useful to search for it).
Also it can be problematic with users and their permissions, or so I've heard: as in you can grant a DB user permission to run a certain stored proc, but if it contains UPDATE/DELETE or the like inside dynamic SQL they may not be able to run the procedure.
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.