Toggle navigation
Dashboard
Dashboard Tracker
Add / Edit My Forums
System Announcements
Discussion
Active Thread Feed
Top Threads Today
Top Threads This Week
Top Threads Library
Go!
View All
View All
Login
Logout
Home
Forums Index
Server Side
/
Databases
1:23 am May 21, 2026
This page requires javascript.
Forum Moderators:
open
Message Too Old, No Replies
Converting a number to a positive number in MySQL
dataguy
Msg#:4314978
11:13 pm on May 19, 2011
(gmt 0)
This seems like it would be simple, but I can't figure out how to do it.
I have a value which may or may not be positive, but I need it to be positive every time. Is there a function for this?
whoisgregg
Msg#:4315336
3:21 pm on May 20, 2011
(gmt 0)
You can get the absolute value using ABS():
http://dev.mysql.com/doc/refman/5.0/en/mathematical-functions.html#function_abs
[dev.mysql.com]
dataguy
Msg#:4315345
3:33 pm on May 20, 2011
(gmt 0)
Oh, that's exactly what I was looking for. I should have known that.
Thanks!
Join The Conversation
Register
For Free! -
Become a
Pro Member
!
See forum categories
-
Enter the Forum
Moderators and Top Contributors
Moderator List
| Top Contributors:
This Week
,
This Month
,
Apr
,
Mar
,
Archive
,
Top 100 All Time
,
Top Voted Members
Hot Threads This Week
May 2026 Google Search Observations
AdSense Earnings and Observations - May 2026
AI visibility audit
Hacker spoofing as GoogleBot
Adsense / Personal Manager / Support
Page indexed but live url test gets 500 error
Link collaboration strategies
in case you missed it .
Bad actor claiming to be OpenAi
Microsoft, AS8075. Google, AS396982.
Home
Forums Index
Server Side
/
Databases
1:23 am May 21, 2026