0

Can I do that because it call from function if i use a normal form such as xxx() in mysql? please show me how to do it,thx.

1
  • Which RDBMS are you using? Stored procedure capabilities are RDBMS-specific. Commented Jan 16, 2011 at 18:11

2 Answers 2

2

In SQL Server it is plain vanilla exec proc statement, here is sql server syntax

create procedure prYourProc
as

-- exec other proc
exec prSomeOtherProc

-- to get return value
declare @var int
exec @var = prSomeOtherProc
Sign up to request clarification or add additional context in comments.

Comments

0

PROCEDURE 1

DROP PROCEDURE IF EXISTS Proc1;
CREATE PROCEDURE Proc1()
BEGIN
  CALL Proc2();
END

PROCEDURE 2

DROP PROCEDURE IF EXISTS Proc2;
CREATE PROCEDURE Proc2()
BEGIN
  SELECT ColumnName  FROM table2;
END

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.