RE: Elegant way to insert of some value in some tables in shortinstruction
От | David Raymond |
---|---|
Тема | RE: Elegant way to insert of some value in some tables in shortinstruction |
Дата | |
Msg-id | VI1PR07MB579286308FF34E5E36254F55874A0@VI1PR07MB5792.eurprd07.prod.outlook.com обсуждение исходный текст |
Ответ на | Elegant way to insert of some value in some tables in shortinstruction (philolilou <philolilou@free.fr>) |
Ответы |
Re: Elegant way to insert of some value in some tables in shortinstruction
|
Список | pgsql-novice |
Short version is when using insert with values you can put a bunch of new records into the SAME table like this... insert into table1 values (1, 'One'), (2, 'Two'), (3, 'Three'); ...but inserts into different tables need to be done in different statements. -----Original Message----- From: philolilou [mailto:philolilou@free.fr] Sent: Wednesday, March 13, 2019 3:04 PM To: pgsql-novice@postgresql.org Subject: Elegant way to insert of some value in some tables in short instruction Hi all, i'm very novice in SQL and try to find an elegant way to insert some values to some tables (that i'll later query with jointure for have a view of only desired informations) but in short way. All manuals i saw until now told me like: insert into table1 values('value1','value2','value3'); insert into table2 values('value1','value2','value3'); Well, it's nice but doesn't it exists a way to make same in 1 operation? Thanks for your answer
В списке pgsql-novice по дате отправления: