What's new

Question re: sql two "or"

Racer_X

Eternal Poster
Joined
May 2, 2020
Posts
693
Reaction
178
Points
407
Hi po

Ask ko lang po paano po hihiwalay yung or or sa sql?
Dalawa or po kasi mag kakadikit

Col1=' ' or is null or Col2=' ' or is null

Salamat po
 
(Col1='' || is null) || (Col2= || is null)
mali po ang syntax pero ganyan po ba yung logic?
 
OR po ginagamit sa sql
Ayaw po kasi nito gumana

SELECT * from tablename where (col1=' ' or is null) or (col2=' ' or is null)

Eto pp yung ginawa ku pero ayaw po gumana



SELECT * from tablename where (col1=' ' or is null) or (col2=' ' or is null)
 
Ayaw po kasi nito gumana

SELECT * from tablename where (col1=' ' or is null) or (col2=' ' or is null)

Eto pp yung ginawa ku pero ayaw po gumana



SELECT * from tablename where (col1=' ' or is null) or (col2=' ' or is null)
remove mo po yung 'is'


SELECT * from tablename where col1=' ' or null or col2=' ' or null
 
1659602033313.png

Eto po, gumana yung ganito
 

Attachments

Similar threads

Back
Top