Using AND and OR together in sql
- From: Opyuse <Opyuse@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 15 Jul 2005 06:41:03 -0700
I've tried to make a search an AND OR query
eg
WHERE name='John' OR name='Paul' AND age='32'
However I keep getting the wrong results. The results I get are every
record with name of John or Paul of age 32 and simply name of John or Paul.
Can anyone show me the way this sql should be set.
PS
I've tried it with the brakets round the age='32' part but that didn't work
either.
Thanks for your replies
.
- Follow-Ups:
- Re: Using AND and OR together in sql
- From: Zoury
- Re: Using AND and OR together in sql
- From: MikeD
- Re: Using AND and OR together in sql
- From: Nospam
- Re: Using AND and OR together in sql
- Prev by Date: Re: Countdown timer
- Next by Date: Internet Explorer - saving images and page content
- Previous by thread: System Root
- Next by thread: Re: Using AND and OR together in sql
- Index(es):
Relevant Pages
|
Loading