Home » SQL & PL/SQL » SQL & PL/SQL » select rows with stored procedure
select rows with stored procedure [message #222496] Mon, 05 March 2007 03:33 Go to next message
rvastronomia
Messages: 2
Registered: March 2007
Junior Member
how can i use select statement in oracle's stored procedure that returns rows(SELECT * FROM USERS).
In sql server i can just call the issue the select statement directly but not in oracle. Thanks in advance

[Updated on: Mon, 05 March 2007 03:57]

Report message to a moderator

Re: select rows with stored procedure [message #222497 is a reply to message #222496] Mon, 05 March 2007 03:41 Go to previous messageGo to next message
dhananjay
Messages: 635
Registered: March 2002
Location: Mumbai
Senior Member
hi,

what do you mean by ?
Quote:
how do can i use select statement in oracle's stored procedure that returns rows(SELECT * FROM USERS).


do you mean to select the rows from a table and display it.then you could do something like

create procedure test_proc(vEmpno emp.empo%type) is
vName emp.ename%type;
begin
select ename into vName from emp where empno=vEmpno;

dbms_output.put_line(vName);
end ;


or are you looking for something else.

regards,
Re: select rows with stored procedure [message #222501 is a reply to message #222497] Mon, 05 March 2007 03:46 Go to previous messageGo to next message
rvastronomia
Messages: 2
Registered: March 2007
Junior Member
Hi thanks dhananjay,

what im going to do is display the selected rows for my web application. i want to use stored procedure in issuing my select statements. the query will return 1 or more rows


[Updated on: Mon, 05 March 2007 03:51]

Report message to a moderator

Re: select rows with stored procedure [message #222513 is a reply to message #222501] Mon, 05 March 2007 04:39 Go to previous message
Littlefoot
Messages: 20890
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Perhaps you might want to read more about REF CURSORS.
Previous Topic: Merging " - " and "+" symbols
Next Topic: group by query
Goto Forum:
  


Current Time: Sat Dec 03 13:48:34 CST 2016

Total time taken to generate the page: 0.09512 seconds