I suggest you use parentheses, by the way, so that it is obvious what you
are doing. I never like to depend upon the precedence of operators to make
my intentions clear. It's too easy to make mistakes.

Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341


> -----Original Message-----
> From: Miguel Vaz [mailto:[EMAIL PROTECTED]
> Sent: Saturday, January 27, 2007 9:21 PM
> To: mysql@lists.mysql.com
> Subject: Re: simple alternate query
>
>
>          I am dumb, so sorry:
>
>          select * from table1 where id=1 or id >=3 and id <=4
>
>          Have to go spank myself until i bleed now, thanks.
>
>
>
>
>
>          Miguel
>
>
>
>
>
>
>
>
>
> At 02:15 28-01-2007, Miguel Vaz wrote:
>
> >         Hi,
> >
> >         I Cant get a simple query to work, heres what i am
> looking for:
> >
> >         table1
> >         ----------------------
> >         id      name
> >         1       peter
> >         2       john
> >         3       mary
> >         4       lisa
> >         5       me
> >
> >         I need a select that always retrieves id 1 and an interval
> > of my choice:
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
>
>




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to