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 insert new field in between?

Re: How insert new field in between?

From: Jim Kennedy <kennedy-family_at_home.com>
Date: Fri, 24 Aug 2001 01:41:27 GMT
Message-ID: <bhih7.439009$p33.8489824@news1.sttls1.wa.home.com>


Try putting the new column in a different position in the select list. For example, if you had
select my_id,a_really_long_col,a_short_col from a_table; now try:
select my_id,a_short_col,a_really_long_col from a_table;

The only difference is the column order in the select (which has nothing to do with the actual column order in the database). The actual order of the columns in the database should not make any difference. If you want them retrieved in a different order then ask for them in a particular order. Jim

"Daniel Cloutier" <danielcloutier_at_web.de> wrote in message news:3b85212c$1_at_netnews.web.de...
> Galen Boyer <galenboyer_at_hotpop.com> wrote:
> >On 23 Aug 2001, danielcloutier_at_web.de wrote:
>
>
> Hi Galen!
>
>
> >> I have quite a problem with one of my tables in my Oracle db. I
> >> wanted to insert a new field into my table using the ALTER sql
> >> command. Now, this command appends the desired field at the end
> >> of the table.
> >
> >So, when you do a "desc table" you see the new column?
>
>
> Yes, the new column has been created and I can see it.
> >
> >> The last field in this table is of type LONG and somehow, I
> >> cannot acces the appended field(VARCHAR2(1).
> >
> >First, why did you use varchar2 for a single character length
> >field? char(1).
>
>
> I donīt know :) I am not a DBA and I was told to do so. I am just a
programmer
> who needs to access the tables. In this particular case, I found out, that
I
> cannot acces columns that are after the column of type LONG. I do this
with the
> JDBC. If the long column is last column of table, I can access all columns
> without any problems.
>
>
>
> >Second, if you do "select new_column from table" do you get an
> >error or to you get no data?
>
>
> Select works fine. I gues, it is just another JAVA problem but I wanted to
know,
> if it possible, to insert a new column between existing colums. Thatīs why
I was
> asking in this NG. Just to go around the Java problem.
> Joerg
>
>
> >--
> >Galen Boyer
> >It seems to me, I remember every single thing I know.
>
> --
> __________________________________________________________
> News suchen, lesen, schreiben mit http://newsgroups.web.de
Received on Thu Aug 23 2001 - 20:41:27 CDT

Original text of this message

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