If it is how can i query on double and date, I mean there has to be a way to cast them back and them sort them for example.
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.
Sure, this can be done, but why do you need to do that, when data types exist that do it for you more reliably and with better performance?
I think I smell the EAV antipattern here…
But to answer your question, you can cast a string containing numbers to the actual numeric value like this:
You can cast a string containing a date literal to the actual date data type with the
STR_TO_DATE()function: