案例一:
使用python查詢mysql:select money from amount where amount_id="1001"
此時查詢出的money結果為10000,類型為Decimal。
無法進行后續的運算和字符串拼接操作。
解決方法:
將sql改造為:select CAST(money as CHAR) as money from amount where amount_id="1001"
此時查詢出的money結果為10000,類型為str。
后續可將str轉換為int或直接拼接