Quantcast
Channel: MySQL Forums - Connector/J, JDBC and Java
Viewing all articles
Browse latest Browse all 884

How to check if a variable is numeric in MySQL (1 reply)

$
0
0
Hi,

I have a column which is String but suppose to contain numeric Strings. Since it is String their is no constraints to not allow anything else then number. Now I need to get data from this column and has to convert it to number. To avoid any error, I am thinking to first check if String contains only number and then convert. Can anyone please advise how we can do it in MySQL.

Thanks

Viewing all articles
Browse latest Browse all 884

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>