Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

select more than one line with where statement

 
Namnai Kidorkar
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in my sql, what i'm trying to do is:

select foo from table_name where bar = 'a' and bar='c' and bar ='f'

this is not working. can someone please give the right syntax about how to do this?
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried using 'or' instead of 'and'?
 
Namnai Kidorkar
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cool!

thanks. it works.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No charge
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic