To select range of values between two columns

I have a table which has 4 columns and i want to get a value between two range of values in column .I tried but it returns null.Pls help me to over come the issue.

GradeID | FAMin|FAMax| FAGrade| 1 | 37 | 40 | A1| SELECT * FROM GradeSystems WHERE FAMin >= 38 AND 38 <= FAMax;

--------------Solutions-------------

Your comparison for FAMin was backwards.

SELECT * FROM GradeSystems WHERE FAMin <= 38 AND FAMax >= 38;

Category:sql Time:2018-12-04 Views:1
Tags: sql sql server

Related post

Copyright (C) pcaskme.com, All Rights Reserved.

processed in 3.916 (s). 15 q(s)