php - MYSQL - get the rows where one column A is less than column B
666
Table (showing only relevant columns)
ID | product_name | stock | stock_level
6 | test name | 5 | 4
7 | test name 2 | 3 | 9
I have a lot more rows in my database.
In MYSQL, how can I get every row where the stock value is less than the stock_level value?
Answer
Solution:
Like this?
That would return row2 (stock = 3, stock_level= 9) but not row1 (stock = 5, stock_level= 4).