Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8851

Re: Calling SQL stored procedure dynamically

$
0
0

Hi Alex,

 

Can you share your requirement on exactly what is the need to call the procedure dynamically?

 

For your question, have a look on the below:

 

1) Have a procedure named EMPLOYEE_DETAILS

 

 

2) Created one more procedure named Dynamically as shown below:

CREATE PROCEDURE Dynamically ()
AS
BEGIN
DECLARE QUERY VARCHAR(1000);
QUERY := 'call  EMPLOYEE_DETIALS(?)';
EXECUTE IMMEDIATE (:QUERY);
END;

 

3) Output:

 

 

Regards,

Krishna Tangudu


Viewing all articles
Browse latest Browse all 8851

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>