Jump to content


Photo

Several query values in WHERE


  • Please log in to reply
2 replies to this topic

#1 aeris130

aeris130
  • Members
  • PipPip
  • Member
  • 22 posts

Posted 22 May 2006 - 05:31 PM

SELECT * FROM table WHERE id ='4'"

This selects every column with id 4. But what if I want to select all columns with id 4,5 and 6 at the same time?

#2 urbandsigns.com

urbandsigns.com
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 22 May 2006 - 05:55 PM

SELECT * FROM table WHERE (id ='4' or id ='5' or id ='6)'


#3 aeris130

aeris130
  • Members
  • PipPip
  • Member
  • 22 posts

Posted 22 May 2006 - 05:57 PM

Many thanks. :D




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users