- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
MySQL to get only the floating-point numbers from a list of values in a column
Let us first create a table −
mysql> create table DemoTable628 (Value DECIMAL(10,2)); Query OK, 0 rows affected (0.52 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable628 values(10.97); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable628 values(20.04); Query OK, 1 row affected (0.18 sec) mysql> insert into DemoTable628 values(12.00); Query OK, 1 row affected (0.17 sec) mysql> insert into DemoTable628 values(89.56); Query OK, 1 row affected (0.20 sec)
Display all records from the table using select statement −
mysql> select *from DemoTable628;
This will produce the following output −
+-------+ | Value | +-------+ | 10.97 | | 20.04 | | 12.00 | | 89.56 | +-------+ 4 rows in set (0.00 sec)
Following is the query to get floating point numbers from a list −
mysql> select *from DemoTable628 where Value!=FLOOR(Value);
This will produce the following output −
+-------+ | Value | +-------+ | 10.97 | | 20.04 | | 89.56 | +-------+ 3 rows in set (0.00 sec)
- Related Articles
- Get minimum value from a column (floating values) with corresponding duplicate ids in MySQL
- Get count of values that only appear once in a MySQL column?
- Get the count of duplicate values from a single column in MySQL?
- How can we get only unique values of a column in MySQL result set?
- MySQL query to find the average of only first three values from a column with five values
- Find and display duplicate values only once from a column in MySQL
- Get the count of only unique rows in a MySQL column?
- Return only the first 15 characters from a column with string values in MySQL
- MySQL query to get first two highest column values from a table?
- MySQL query to remove a value with only numbers in a column
- Signed floating point numbers
- Comparison of floating point values in PHP.
- MySQL query to return the count of only NO values from corresponding column value
- How to select only non - numeric values from varchar column in MySQL?
- Get only the file extension from a column with file names as strings in MySQL?

Advertisements