Filter tables
| От | Reg Me Please |
|---|---|
| Тема | Filter tables |
| Дата | |
| Msg-id | 200711121643.51645.regmeplease@gmail.com обсуждение исходный текст |
| Ответы |
Re: Filter tables
Re: Filter tables |
| Список | pgsql-general |
Hi all. I have this sample setup: CREATE table t1 ( t text, id int ); CREATE TABLE f1 ( t text ); INSERT INTO t1 VALUES ( 'field1',1 ), ( 'field2',1 ), ( 'field3',1 ), ( 'field1',2 ), ( 'field3',3 ) ; INSERT INTO f1 VALUES ( 'field1' ), ( 'field2' ) ; What I'd need to do is to "filter" t1 against f1 to get only the rows ( 'field1',1 ) and ( 'field2',1 ). Of course both t1 and f1 don't have a defined number of rows, though usually t1 should be much bigger that f1. I have a rather complex solution in mind with loops in a plpgsql function and am wondering whether there is one simpler. Thanks a lot. -- Reg me Please
В списке pgsql-general по дате отправления: