Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: how to declare cursor ?

Re: how to declare cursor ?

From: Jim Kennedy <kennedy-family_at_attbi.com>
Date: Sat, 27 Jul 2002 05:42:08 GMT
Message-ID: <Qoq09.51569$uh7.6339@sccrnsc03>


Good practice is to ask for the columns you want explicitly. It will save you many bugs and headaches later. But if you insist then select e.*,d.* from dept d, employee e where d.dept_no=e.dept_no;

Bad practice.
Jim

"dragon ball" <perseus_medusa_at_hotmail.com> wrote in message news:3d422d17$1_at_newsgate.hknet.com...
> Hi all , I am learning to write PL/SQL and when I declare the following :
>
> CURSOR foo_cur IS
> SELECT * FROM DEPT, EMPLOYEE
> WHERE DEPT.dept_no = EMPLOYEE.dept_no
>
> the compiler complain me of duplicating column ( I guess is the confused
> dept_no between two table) . So is there anyway shorter to declare all the
> column in dept and employee without writing explicitly each column ? Since
I
> think the list will be very very long if the joining involve several
tables
> and I require all columns.
>
> Thanks
>
> Perseus
>
>
Received on Sat Jul 27 2002 - 00:42:08 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US