Will schema-prefixing a stored procedure also limit the scope of all the procedures called inside it to that schema?
Take the following scenerio in consideration:
Say I have a stored procedure parentProc that calls proc childA childB and childC. This procedure is available in all schemas SchemaA, public and SchemaB like this:
create or replace procedure parentProc(){
CALL childA;
CALL childB;
CALL childC;
}
SchemaA
|_parentProc
|_childA
|_childB
|_ChildC
SchemaB
|_parentProc
|_childA
|_childB
|_ChildC
public
|_parentProc
|_childA
|_childB
|_ChildC
the default search path is public, so when I call dbo.parentProc will the procedure in the same schema(dbo) be called or from the public?
If childA, childB and childC are views instead, what will happen in that scenerio? Will the parentproc being prefixed scope the views to that schema?