Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to convert null to float in mysql

CREATE TABLE `table` (id int, col int);

INSERT INTO `table` VALUES (1, 100);
INSERT INTO `table` VALUES (2, NULL);
INSERT INTO `table` VALUES (3, 300);
INSERT INTO `table` VALUES (4, NULL);
Comment

how to convert null to float in mysql

+------------------+
| COALESCE(col, 0) |
+------------------+
|              100 |
|                0 |
|              300 |
|                0 |
+------------------+
4 rows in set (0.00 sec)
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql select field if condition 
Sql :: less than and between in sql query 
Sql :: above average salary in sql 
Sql :: find in set in postgresql 
Sql :: WHERE value IS sql 
Sql :: sql date between one week 
Sql :: mysql undo delete 
Sql :: what does leave do in mysql 
Sql :: Kill session in SQL Developer 
Sql :: mamp mysql password 
Sql :: sqlalchemy orm duplicate 
Sql :: sql transfer table in other 
Sql :: disable database droping sql 
Sql :: sql query for displaying age from oldest to youngest 
Sql :: laravel subquery in from clause 
Sql :: sql select without column name 
Sql :: sql division operator 
Sql :: How to automatically export database to a csv file 
Sql :: primary key with prefix sql 
Sql :: like in sql 
Sql :: quit mysql 
Sql :: cardinality example sql 
Sql :: SQL Equal to Operator 
Sql :: in sqlalchemy 
Sql :: postgresql replace html tags from string 
Sql :: decode plsql 
Sql :: call procedure in wordpress 
Sql :: trigger stock phpmyadmin 
Sql :: MySQL Age Counter 
Sql :: prepared statement mysql java delete selected rows 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =