| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Sebastian Tobias Mendel genannt Mendelsohn | Date: | September 8 2003 5:10pm |
| Subject: | Re: SubQueries and IN | ||
| View as plain text | |||
>>SELECT product_id, name, description, sales.sale_id >>FROM products LEFT JOIN sales ON products.product_id = sales.product_id >>WHERE sales.customer_id = 10 AND sales.sale_id IS NULL > > > This query should return no rows, because if you retrieve rows where sales.sale_id is > NULL, customer_id for these rows also will be NULL, not 10. you are wrong, or do you know the table-structure? sales.sale_id can be NULL while customer_id can be 10 ! -- Sebastian Mendel www.sebastianmendel.de www.tekkno4u.de www.nofetish.com
| Thread | ||
|---|---|---|
| • SubQueries and IN | Andy Hall | 8 Sep |
| • Re: SubQueries and IN | Sebastian Tobias Mendel genannt Mendelsohn | 8 Sep |
| • Re: SubQueries and IN | Chris Boget | 8 Sep |
| • Re: SubQueries and IN | Roger Baklund | 8 Sep |
| • Re: SubQueries and IN | Andy Hall | 8 Sep |
| • Re: SubQueries and IN | Egor Egorov | 8 Sep |
| • Re: SubQueries and IN | Sebastian Tobias Mendel genannt Mendelsohn | 8 Sep |
| • Re: SubQueries and IN | Egor Egorov | 8 Sep |
| • RE: SubQueries and IN | Adam Fortuno | 8 Sep |
| • Re: SubQueries and IN | Andy Hall | 8 Sep |
