1
I have the val_products table, where you have id_product and product value, I need to select * only on the line whose ID is the largest, for example, I have two products with ID’s 1 and 2, but I need to return on this select only the line with ID 2. I tried to use the max(id_product), but it gives error if used after Where.
It is not necessary to make a subselect, the ideal is to sort by the ID field and limit the query to 1 result.
– arllondias