This is how my license table look like.. i want to select only row that has atleast one "1".
which means i don't want to select any row that has full of zeros..
fire eaters
0
Newbie Poster
Recommended Answers
Jump to PostUse a calculated column that sums all your 0/1 columns. Then you can just add
WHERE summed > 0
Jump to PostSELECT * FROM `licence` WHERE F1+F2+F3+F4+F5+F6+F7+F8+A+A1+B+B1+B2+C+C1+C2+V1 > 0
All 5 Replies
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
fire eaters
0
Newbie Poster
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
fire eaters
0
Newbie Poster
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
fire eaters
commented:
Perfect answer
+1
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.