On Tuesday 06 February 2001 13:31, Steve Ruby wrote:
-> "Ung, Seng" wrote:
-> >
-> > hi:
-> > Here is my SQL statement to select a range of number from 0-9
-> >
-> > Is there a short cut to this?
-> >
-> > id like '1%' or id like '2%' or id like '3%' or id like '4%' or id
like '5%' or id like '6%' or id like '7%' or id like '8%' or id like '9%' or
id like '0%' ->
->
-> see REGEXP in the manual
->
-> you want
->
-> id regexp '^[0-9]'
REGEXP are VERY slow in MySQL. Talked about it in my other post about query
optimazation.... It's faster to build your queries with LIKE '1%' than
regexp. But again, everything depands how many matches/regexp one has to
do....
->
-> ---------------------------------------------------------------------
-> Before posting, please check:
-> http://www.mysql.com/manual.php (the manual)
-> http://lists.mysql.com/ (the list archive)
->
-> To request this thread, e-mail <[EMAIL PROTECTED]>
-> To unsubscribe, e-mail
<[EMAIL PROTECTED]> -> Trouble
unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
--
Bolek,
URL: http://www.bolek.com
URL: http://slash.bolek.com
e-mail: [EMAIL PROTECTED]
ICQ: 4086197, Address: 402905326
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php