0

Ok here's my task

I have a list of lenders like this

lender  name
1       lender 1
2       some other lender

and I have a list of states like this

lender  state
1       AK
1       WY
1       NY
2       AZ
2       FL 

so i have an area, for example FL, i need to select all lenders where state = "FL" OR where state is not defined at all (this would mean ANY state)

I can't figure out how to do the second part (where state is not defined). Any help to figure out?

Thanks

Alex K
  • 6,737
  • 9
  • 41
  • 63

2 Answers2

1
select * from lenders where state='FL' or state is null
UltraInstinct
  • 43,308
  • 12
  • 81
  • 104
0

Assuming the "undefined" fields are NULL, you could simply add OR state IS NULL to your query.

dee-see
  • 23,668
  • 5
  • 58
  • 91