Databases| SQL| MySQL| Questions?

 

 

 

 

 

 

 

 

 

 

 

 

 

Search Tutorials

Latest Questions
Comments
 
MySQL Absolute Value 
 

MySQL Absolute Value is used to return the absolute value of a records in table. The keyword abs is used to return the absolute numerical value of a records in a table.

 

MySQL Absolute Value

                         

MySQL Absolute Value is used to return the absolute value of a records in table. The keyword abs is used to return the absolute numerical value of a records in a table. It returns you the positive magnitude number irrespective of  any positive and negative numbers.

Understand with Example

The Tutorial describes you to find the Absolute Value in MySQL. To understand the example we use select query to run, that returns you the set of records from table 'emp_table'.

 

 

Query

 

 select * from emp_table;

 

Output

 

+--------+----------+-----------------+-----------+
| emp_id | emp_name | emp_designation | emp_value |
+--------+----------+-----------------+-----------+
| 1      | sandeep  | programmer      | -25.88    |
| 2      | suman    | sr. Gr Designer | 0.587     |
| 3      | ravi     | s/w developer   | 91.456    |
+--------+----------+-----------------+-----------+
 

 

In this example we use abs keywords to find the absolute value in the sql query. In the given table the column emp_value define float datatype. The select abs(emp_value) returns the numerical value without regards to its sign.

Here the absolute value display of emp_value column:

Query

 

select emp_value, abs(emp_value) from emp_table;

 

Output

 

+-----------+------------------+
| emp_value | abs(emp_value)   |
+-----------+------------------+
| -25.88    | 25.879999160767  |
| 0.587     | 0.58700001239777 |
| 91.456    | 91.456001281738  |
+-----------+------------------+

 

                         

» View all related tutorials
Related Tags: sql c database security orm data form application io user sed format uri ai credentials app tab injection like for

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Training Courses
Tell A Friend
Your Friend Name
Software Solutions
Least Viewed
Most Rated
Recently Viewed
Search Tutorials

 

 
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Flex Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.