Re: Help Please

From: Brian P. Mac Lean <brian.maclean_at_teldta.com>
Date: 1996/08/28
Message-ID: <3224B26A.285E_at_teldta.com>#1/1


Zhangshi Yin wrote:
>
> Greeting:
>
> Does anybody know how to append a table to another table. The two
> tables have the absolutely same columns. Any helps will be highly
> appreciated.
>
> Please reply to my account: yinz_at_dugong.ksc.nasa.gov
>
> Zhangshi

If I understand you right, it's as simple as:

SQL> select * from table_one;  

FIELD1                             FIELD2
------------------------------ ----------
ONE                                     1
TWO                                     2
THREE                                   3
 

SQL> select * from table_two;  

FIELD1                             FIELD2
------------------------------ ----------
FOUR                                    4
FIVE                                    5
SIX                                     6
SEVEN                                   7
 

SQL> insert into table_one select * from table_two;  

4 rows created.  

SQL> commit;  

Commit complete.  

SQL> select * from table_one;  

FIELD1                             FIELD2
------------------------------ ----------
ONE                                     1
TWO                                     2
THREE                                   3
FOUR                                    4
FIVE                                    5
SIX                                     6
SEVEN                                   7
 

7 rows selected.  

SQL>

                       \\|//
                       (0-0)
           +-----oOO----(_)-----------+
           | Brian P. Mac Lean        |
           | Database Analyst         |
           | brian.maclean_at_teldta.com |
           | http://www.teldta.com    |
           +-------------------oOO----+
                      |__|__|
                       || ||
                      ooO Ooo
Received on Wed Aug 28 1996 - 00:00:00 CEST

Original text of this message