0 votes
1 view
in SQL by (34.6k points)

Can anyone explain how to replace NULL values with ‘0’ in SQL?

1 Answer

0 votes
by (72.1k points)

In SQL, you can use ISNULL () function to replace the NULL values with any value. Here is the syntax for replacing NULL values with zero:

SELECT ISNULL (Column_name , 0 )

FROM Table_Name;

You can also use COALESCE() function to replace NULL values and the following is the syntax for that:

SELECT COALESCE (Column_name , 0 )

FROM Table_Name;

If you want to take a course that can provide Instructor-led training and certification then sign up for this SQL Certification program by Intellipaat.

Related questions

0 votes
1 answer
asked May 3 in SQL by Sudhir_1997 (34.6k points)
0 votes
1 answer
0 votes
1 answer
asked Jul 19, 2019 in SQL by Tech4ever (22.4k points)
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...