Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2008
    Posts
    28

    select * from where Productid in (.......), please

    select * from where Productid in (1,2,3,4,5,6...)


    if productid in (1 - 6)

    it can do

    but i don't know

    if productid in (1-3000)

    do it can?

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    ... WHERE Productid BETWEEN 1 AND 3000
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Aug 2008
    Posts
    28
    thanks sir

    sorry
    i mean
    select * from .. where productid in (1,5,12,469,4876,4543438,4343439,5651,1487845,4456 6.........................)
    (10000 number)

    do it can? or is it error?

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    why not try it and see for yourself?
    what's the worst that can happen if it doesn't work?

    in the 5 hours that has elapsed since you first asked the question you coudl have satisfied yourself of the anser to this long long ago, probably 4 hours and 55 minutes ago
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Where do these specific product ids come from? If it's another SELECT statement then you have better options than the IN operator .
    George
    Home | Blog

  6. #6
    Join Date
    Aug 2008
    Posts
    28
    That Right..!

    OK Thank you very much...

    I'll try to do it first if it isn't work , I'll post here again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •