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
5:49 pm Jul 10, 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
,
Jun
,
May
,
Archive
,
Top 100 All Time
,
Top Voted Members
Hot Threads This Week
July 2026 Google Search Observations
AI = New incoming wave of unemployment?
AdSense Earnings and Observations - July 2026
Annoying Crawler, Bot, or what?
How Would Someone Lock Onto A PDF
What strategies work to produce AI share of access?
Structuring Performance-Based Digital PR For Link Building
Do anything special today?
June 2026 Google Search Observations
Home
Forums Index
Server Side
/
Databases
5:49 pm Jul 10, 2026