| От | Matthew Hagerty |
|---|---|
| Тема | Join with blank records. |
| Дата | |
| Msg-id | 4.1.19990728134746.03f6c4d0@mail.venux.net обсуждение |
| Ответы |
Re: [SQL] Join with blank records.
|
| Список | pgsql-sql |
Greetings, I have two tables, one is customers and one is their phones. Something simple like this: customer cust_id int4 cust_name varchar(30) phone cust_id int4 number varchar(15) select c.*, p.number from customer and c, phone as p where c.cust_name='smith' and p.cust_id = c.cust_id; The problem I am having with this is that only records in the customer table that have matching records in the phone number table are showing up. What I would really like is for all records that match the first criteria to show up regardless if they have matching phone number records. Any insight would be greatly appreciated. Thank you, Matthew Hagerty
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера