Reputation: 13
I want to select All Record from my table where referal = 0 and 1 and pos_left=NULL OR pos_right=NULL
Can anyone help me provide sql please. Table Record
Upvotes: 0
Views: 26
Reputation: 324
SELECT * from your_table
WHERE referral IN (0,1)
AND ( ( pos_left IS NULL ) OR ( pos_right IS NULL ) )
Problem with logical expressions: field referal cannot be = 0 and 1, like human being is always man OR woman and cannot be man AND woman ;-)
Upvotes: 1