Reputation:
I have :
select if(G.grade<5,G.grade,NULL)
what condition should I instead of NULL
to not display the rows?
Upvotes: 0
Views: 36
Reputation: 70523
In sql we have a a where statement
select -- *
from something
where g.grade<5
thisis how you filter rows in sql
You're tottaly different question (in the comment) is solved like this:
SELECT CASE WHEN g.grade < 5 THEN g.grade ELSE null END AS badgrade,
CASE WHEN g.grade >=5 THEN g.grade ELSE null END AS goodgrade
FROM G
Upvotes: 3