| Write dynamic Query to accept dynamic variable and dynamic column in SQL?
Below are the two example to write dynamic and use EXEC and sp_executesql command to execute this dynamically:-
(1)Dynamic SQL commands by using EXEC statement
(2)Dynamic SQL commands by using sp_executesql
| | |