I have customer_price stored as DECIMAL (8,2).
Using Python, how would I preserve the two digits after the decimal?
cursor.execute("SELECT customer_price FROM table")
customer_price = cursor.fetchone() # this will give me values such as 7 instead of 7.00
That does not imply Python is losing the number’s digits after the decimal point. If you just need to print them with 2 decimal places then you should look at the answers to this question. I.e.: