How can we call stored procedures inside store procedures?
Answer / Rahul Tyagi
Calling a stored procedure within another stored procedure is possible in most database systems. The syntax for doing so varies between different database management systems (DBMS). In Oracle, for example, you can use the DBMS_SQL package to dynamically execute a stored procedure from within another stored procedure. Here's an example:
```sql
DECLARE
procedure_result NUMBER;
procedure_name VARCHAR2(100) := 'PROCEDURE_TO_CALL';
parameter1 VARCHAR2(50);
parameter2 NUMBER;
BEGIN
DBMS_SQL.PARSE(sql_handle => procedure_handle,
sql_statement => 'BEGIN ' || procedure_name || '(p1, p2); END;',
bind_array => NULL,
limit => 500,
warn_flag => DBMS_SQL.WARNINGS_ON);
DBMS_SQL.CALL_PROCEDURE(procedure_handle => procedure_handle,
arg1 => parameter1,
arg2 => parameter2);
DBMS_SQL.CLOSE(procedure_handle);
END;
```
| Is This Answer Correct ? | 0 Yes | 0 No |
What is join dependency and inclusion dependency?
Does storing of data in stored procedures increase the access time? Explain?
Can we use commit inside the trigger? If not then how can we save the transaction made by the trigger?
What is an Entity?
What is Set-at-a-time or Set-oriented?
What is the difference between a user defined function and a stored procedure?
What is a view? How it is related to data independence?
What is 4NF?
What is the Disadvantage in File Processing System?
Which is super key?
Explain what are the restrictions that views have to follow? : sql server architect
What is n tier architecture with example?
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)