Home > Forum > Sql Server > How to call stored procedure in a sql select statement?

How to call stored procedure in a sql select statement?

by Thamil   on Sep 09, 2013   Category: Sql Server  |  Views: 18654    |  Points: 5   |  Gold 
  Reply

Hi Friends,

Execute a Stored Procedure in sql select statement.

Example: select <stored procedure name>

question posted on behalf of Mohanakrishnan.

Bookmark and Share:
 
  User Reply  | Ask a question  |   Reply 
  Re :How to call stored procedure in a sql select statement?   
by Thamil
on Sep 9 2013 3:17AM
Points : 10
Gold 
Hello Mohanakrishnan,

please follow the below way

Calling stored proc in select statments

SELECT sp.Column1,sp.Column2,sp.Column3, t.column1,t.column2
FROM sp_name (any Argumnets) sp INNER JOIN table2 t ON t.no = sp.no


also calling function in select statement

SELECT dbo.fn_test(t.id) AS columname from testtbl t;

Recent Post

Latest Posts