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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Column name

Re: Column name

From: Eric D. Pierce <PierceED_at_csus.edu>
Date: Fri, 27 Apr 2001 10:28:12 -0700
Message-ID: <F001.002F45CD.20010427094528@fatcity.com>

spool
currently spooling to C:\WINDOWS\Desktop\huh.LST SQL> create table test1 (f1 char(1))
  2
SQL> / Table created.

SQL> ed
Wrote file afiedt.buf
  1* create table test2 (f1 char(1))
SQL> / Table created.

SQL> ed
Wrote file afiedt.buf
  1* insert into test2 values ('2')
SQL> / 1 row created.

SQL> commit;

Commit complete.

SQL> ed
Wrote file afiedt.buf
  1* insert into test1 values ('1')
SQL> / 1 row created.

SQL> commit;

Commit complete.

SQL> select test1.f1, test2.f1
  2 from test1, test2;

F F                                                                   
                              
- -                                                                   
                              
1 2                                                                   
                              

SQL> ed
Wrote file afiedt.buf
  1 select f1, f1
  2* from test1, test2
SQL> /
select f1, f1

           *
ERROR at line 1:
ORA-00918: column ambiguously defined

SQL> ed
Wrote file afiedt.buf
  1 select test1.f1, f1
  2* from test1, test2
SQL> /
select test1.f1, f1

                 *

ERROR at line 1:
ORA-00918: column ambiguously defined

SQL> ed
Wrote file afiedt.buf
  1 select f1, test2.f1
  2* from test1, test2
SQL> /
select f1, test2.f1

       *
ERROR at line 1:
ORA-00918: column ambiguously defined

SQL> drop table test1
  2
SQL> / Table dropped.

SQL> drop table test2
  2
SQL> / Table dropped.

SQL> spool off

On 27 Apr 2001, at 2:00, Roland.Skoldblom_at_ica.se wrote:

> Can I use the same column name in the same database and in the
> same schema? Could this cause me lots of trouble?

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Eric D. Pierce
  INET: PierceED_at_csus.edu

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Apr 27 2001 - 12:28:12 CDT

Original text of this message

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