From: yen <ryannecruz@yahoo.com>
To: docs@postgresql.org
Subject: question regarding Example 2-4
Date: Thu, 17 Feb 2005 16:43:34 -0800 (PST)
Message-ID: <20050218004334.81557.qmail@web14306.mail.yahoo.com> (raw)
Hi.
I was reading the postgres tutorial and I was confused by this example. I'll post here the example and the given tables.
Example 2-1. The Suppliers and Parts Database
SUPPLIER SNO | SNAME | CITY SELLS SNO | PNO -----+---------+-------- -----+----- 1 | Smith | London 1 | 1 2 | Jones | Paris 1 | 2 3 | Adams | Vienna 2 | 4 4 | Blake | Rome 3 | 1 3 | 3 4 | 2 PART PNO | PNAME | PRICE 4 | 3 -----+---------+--------- 4 | 4 1 | Screw | 10 2 | Nut | 8 3 | Bolt | 15 4 | Cam | 25
SELECT PNAME, PRICE
FROM PART
WHERE PNAME = 'Bolt' AND
(PRICE = 0 OR PRICE < 15);
will lead to the result:
PNAME | PRICE --------+-------- Bolt | 15
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: ryannecruz@yahoo.com, docs@postgresql.org
Subject: Re: question regarding Example 2-4
In-Reply-To: <20050218004334.81557.qmail@web14306.mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox