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
9:29 pm Aug 24, 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
,
Jul
,
Jun
,
Archive
,
Top 100 All Time
,
Top Voted Members
Hot Threads This Week
August 2026 Google Search Observations
Annoying Crawler, Bot, or what?
AdSense Earnings and Observations - August 2026
Penetration testing using AI bots
How has AI changed your work?
Do you still build external links in 2026?
Home
Forums Index
Server Side
/
Databases
9:29 pm Aug 24, 2026