Resources
Answers
Examples
Sign in
Get Started
What do you want to save?
Add Code snippet
New code examples
SQL
2022-03-27 18:35:10
replace null with 0 in sql
SELECT IFNULL(Price, 0) FROM Products; SELECT COALESCE(Price, 0) FROM Products; -- Oracle (extra): SELECT NVL(Price, 0) FROM Products;
Add solution
PHP
2022-02-27 03:25:05
check null if string laravel
$query->whereRAW("IFNULL(COLUMN_NAME,'') = '' ")
Add solution
SQL
2021-11-19 17:51:15
mysql select if empty result
SELECT IFNULL( (SELECT field1 FROM table WHERE id = 123 LIMIT 1) ,'not found');
Add solution
SQL
2021-11-03 09:01:12
if column value is null then in mysql
SELECT contactname, IFNULL(bizphone, homephone) phone FROM contacts;
Add solution
SQL
2021-10-13 04:06:03
mysql ifnull
##syntax: SELECT IFNULL(col_with_null_value, default_value); ##you can see the result select with the string NA where the document is null: SELECT IFNULL(user_document_id, 'NA');
Add solution
PHP
2021-10-08 09:49:03
how to pass php variable in mysql laravel database
$data = DB::select(DB::raw("SELECT pur_price FROM productpricing WHERE mst_uid = (SELECT mst_uid FROM master_material ...
Add solution
SQL
2021-10-06 15:55:02
mysql return 0 if null
SELECT IFNULL(field, 0) AS field FROM products WHERE id = 1 SELECT IFNULL(SUM(field), 0) as field FROM products
Add solution
SQL
2021-09-27 11:06:02
mysql if null
SELECT IFNULL(field, 0) AS field FROM products WHERE id = 1 SELECT IFNULL(SUM(field), 0) as field FROM products
Add solution
SQL
2021-09-15 18:59:06
isnull sql server
SELECT ISNULL(ValueToBeTested, ReturnValueIfNull);
Add solution
SQL
2021-09-06 00:05:02
mysql select default if null
IFNULL(MAX(EMAIL), "
[email protected]
") as email
Add solution
‹
1
2
›
Best helpers
daily
weekly
monthly
for 3 months
Martha Sanchez
+5
Gbutters
+5
Lee Kowalkowski
+5
Duros
+5
Bleh
+5
Lazzlo
+5
C. Marshall Towsley
+5
Xhr1s
+5
Ajwad Taqvi
+5
show more
This website uses cookies to make IQCode work for you. By using this site, you agree to our
cookie policy
Welcome Back!
Sign up to unlock all of IQCode features:
Test your skills and track progress
Engage in comprehensive interactive courses
Commit to daily skill-enhancing challenges
Solve practical, real-world issues
Share your insights and learnings
Sign in
E-mail
Password
Recover lost password
Log in
Or log in with
Not registered?
Sign up takes less than a minute
Create a Free Account
Sign up to unlock all of IQCode features:
Test your skills and track progress
Engage in comprehensive interactive courses
Commit to daily skill-enhancing challenges
Solve practical, real-world issues
Share your insights and learnings
Sign up
Email
Password
Sign up for free
Or sign up with
By signing up, you agree to the
Terms and Conditions
and
Privacy Policy
. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.