Procedure creation help [message #680417] |
Wed, 13 May 2020 13:53 |
|
chavva.kiru@gmail.com
Messages: 23 Registered: April 2012 Location: hyderabad
|
Junior Member |
|
|
Hi,
I want to create a procedure in such a way that I want to pass a table name to a procedure,It has to return table o/p.How can we create that procedure?
|
|
|
|
|
Re: Procedure creation help [message #680424 is a reply to message #680417] |
Wed, 13 May 2020 14:19 |
|
Michel Cadot
Messages: 68694 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
From one of your previous topics:
Michel Cadot wrote on Tue, 22 October 2019 21:34
From your previous topics:
Michel Cadot wrote on Tue, 01 October 2019 20:09
From your previous topic:
Michel Cadot wrote on Wed, 25 September 2019 08:04
From your previous topics:
Michel Cadot wrote on Wed, 25 September 2019 08:03Michel Cadot wrote on Thu, 06 October 2016 07:30
From your previous topic:
Michel Cadot wrote on Mon, 19 January 2015 07:22
From your previous topic:
Michel Cadot wrote on Thu, 16 August 2012 16:20From your previous topics:
BlackSwan wrote on Wed, 11 April 2012 16:43Please read and follow the forum guidelines, to enable us to help you:
http://www.orafaq.com/forum/t/88153/0/
BlackSwan wrote on Wed, 11 April 2012 20:29...
READ & FOLLOW the Posting Guidelines! http://www.orafaq.com/forum/t/88153/0/
With any SQL question, Post a working Test case: create table and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.
Before, Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version, with 4 decimals.
Regards
Michel
In addition, Barbara helped you so much in your previous topics providing you codes and examples and you did never feedback and thank her.
Are you the kind of parasite we saw too much in these days?
Or are you a valuable person who deserves to be helped?
[Updated on: Wed, 13 May 2020 14:20] Report message to a moderator
|
|
|
|
|
|
Re: Procedure creation help [message #680447 is a reply to message #680443] |
Thu, 14 May 2020 10:15 |
|
chavva.kiru@gmail.com
Messages: 23 Registered: April 2012 Location: hyderabad
|
Junior Member |
|
|
The interviewer told me that we have to use ref cursor and dynamic sql ,what i guessed as below
create or replace procedure abc( a tablename,out c1) as
begin
TYPE SalTabTyp IS TABLE OF a%TYPE
INDEX BY BINARY_INTEGER;
type auth_cursor is ref cursor;
c1 auth_cursor;
c1 %rowtype;
begin
open c1 for select * from a;
execute immediate create table a as c1;
end;
/
[Updated on: Thu, 14 May 2020 10:16] Report message to a moderator
|
|
|
Re: Procedure creation help [message #680448 is a reply to message #680447] |
Thu, 14 May 2020 10:55 |
|
Michel Cadot
Messages: 68694 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
The interviewer or your friend?
More than 8 years to write PL/SQL and you are at level 0!
As you are at level -∞ to post in this forum.
|
|
|