Categories
- All Categories
- Oracle Analytics and AI Learning Hub
- 44 Oracle Analytics and AI Sharing Center
- 20 Oracle Analytics and AI Lounge
- 278 Oracle Analytics and AI News
- 56 Oracle Analytics and AI Videos
- 16.2K Oracle Analytics and AI Forums
- 6.4K Oracle Analytics and AI Labs
- Oracle Analytics and AI User Groups
- 103 Oracle Analytics and AI Trainings
- 20 Oracle Analytics and AI Challenge
- Find Partners
- For Partners
SQL Table References
When creating a stored procedure within SQL, would I have to explicitly state which tables would be used if that procedure is shared?
Here is an example:
I wrote a procedure that would allow for easy modifying of data. The procedure is meant to truncate all of the relevant tables to my task, then adds the original data back in, always providing me a clean copy of the tables. - Yes I know this is not realistic in production.
Here is a snippet:
BEGIN
/* trauncate info in all existing tables */
execute immediate 'truncate table Customers';
/*insert data into table */
insert into customers values(2111,'JCP Inc.',103,50000);
END;
Would I have to pass in as a parameter the username of the tables that are accessed if every user has teh same tables as me? - making the new truncate command:
execute immediate 'truncate table userName.Customers';
