For example: table name = table
column1 | column2
1 7
2 8
3 9
4 NULL
5 11
6 12
A user is asked to enter two values, one from column1 and one from column 2. Lets say user enters 2 and 12. the result should look something like this.
column1 | column2
3 9
4 NULL
5 11
I have tried by using this code below but i’m not sure if it works correctly. Plus Null values are not shown so that’s a problem too. Also, actual values contain both numeric and string values.
SELECT DISTINCT column1, column2
FROM table
WHERE column1
BETWEEN '&column1' AND column1
AND column2 NOT BETWEEN '&column2 AND column2
ORDER BY column1;
Thank you for replying
1 Answer