I have a column in mysql of float type, I need to load currency like numbers($300) into this column, how do I do that in MYSQL? (let’s not argue about the choice of float for this column)
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
varchar2instead offloatcopy data from temporary table to real table and use msql functions to convert the currency into a float, using something like:
(CAST ( SUBSTRING( TRIM( amountStr ), 1 ) AS FLOAT )