IN ('Bob','Mike','Betty');
Kevin
-Original Message-
From: Paul Fine [mailto:[EMAIL PROTECTED]
Sent: Friday, July 23, 2004 3:01 PM
To: [EMAIL PROTECTED]
Subject: Another newbie question - using OR in WHERE clauses
Is there a simpler way to write something like:
SELECT * FROM
Is there a simpler way to write something like:
SELECT * FROM tablename
WHERE columname = 'Bob' OR columname = 'Mike' OR columname = 'Betty'
Clearly this does not work:
WHERE columname = 'Bob' OR 'Mike' OR 'Betty'
Thanks!
Paul,
You can do the following:
SELECT * FROM tablename WHERE columname IN ('Bob','Mike','Betty');
Kevin
-Original Message-
From: Paul Fine [mailto:[EMAIL PROTECTED]
Sent: Friday, July 23, 2004 3:01 PM
To: [EMAIL PROTECTED]
Subject: Another newbie question - using OR in WHERE
on 7/23/04 3:00 PM, Paul Fine at [EMAIL PROTECTED] wrote:
SELECT * FROM tablename
WHERE columname = 'Bob' OR columname = 'Mike' OR columname = 'Betty'
This is perfectly accurate
--
-
Scott Haneda
I am finally able to enter data and am going through the Tutorial in section 3 of the
mySQL manual. It suggests that I create a .txt file from which to load date into a
table. Where does mySQL look for data to load in the default installation? I thought
it would be in the data folder under
George,
Try in the folder with the same name as your database, under the data
folder.
Andy
-Original Message-
From: Degan, George E, JR, MGSVC [mailto:[EMAIL PROTECTED]
Sent: 15 July 2003 13:30
To: [EMAIL PROTECTED]
Subject: Another Newbie Question
I am finally able to enter
Bob Rea schrieb am Samstag, 21. Juli 2001, 19:14:34:
On Friday 20 July 2001 10:46 pm, you wrote:
You may want to understand what distinct and avg means. The
combination doesn't make sense.
I took the example in question out of a book that I am using to teach
myself SQL. So I don't quite
The SQL book I am using has this:
mysql select avg(distinct prod_price) as avg_price
- from Products
- where vend_id = 'dll01'
- ;
and responds thus:
ERROR 1064: You have an error in your SQL syntax near 'distinct
prod_price) as avg_price
from Products
where vend_id = 'dll01'' at
You may want to understand what distinct and avg means. The
combination doesn't make sense.
Bob Rea schrieb am Samstag, 21. Juli 2001, 02:36:11:
The SQL book I am using has this:
mysql select avg(distinct prod_price) as avg_price
- from Products
- where vend_id = 'dll01'
- ;