Re: How to select all columns and insert into other table

Поиск
Список
Период
Сортировка
От Jayadevan M
Тема Re: How to select all columns and insert into other table
Дата
Msg-id OFBB8D044F.CB1B4C92-ON652576CE.00380D1E-652576CE.00382A7C@ibsplc.com
обсуждение исходный текст
Ответ на How to select all columns and insert into other table  (A B <gentosaker@gmail.com>)
Список pgsql-novice


From:        A B <gentosaker@gmail.com>
To:        pgsql-novice@postgresql.org
Date:        02/18/2010 03:38 PM
Subject:        [NOVICE] How to select all columns and insert into other table
Sent by:        pgsql-novice-owner@postgresql.org




Hello.

If tableA and tableB have the same columns but in differrent order

Is there a way to get

INSERT INTO tableA  SELECT * FROM tableB  LIMIT 1;

to work, that is, get the value in column  X to be placed in the
corresponding column in tableA  without listing all the columns?


Create a view on the source table with columns listed in the necessary order and use the view?

Regards,
Jayadevan




DISCLAIMER:


"The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect."





В списке pgsql-novice по дате отправления:

Предыдущее
От: A B
Дата:
Сообщение: How to select all columns and insert into other table
Следующее
От: dipti shah
Дата:
Сообщение: Re: [GENERAL] Define permissions at database level