0

I want to the syntax for if else syntax in sql query

I need query of if else in which when a value of column A is null then the column B which is using column A value in the formula which is applied in the column B must return null value not 0

2nd Apr 2022, 9:26 PM
Abdul Hadi
Abdul Hadi - avatar
2 Respuestas
3rd Apr 2022, 1:45 AM
NonStop CODING
NonStop CODING - avatar
0
Abdul Hadi not all SQL engines would handle this the same way. Some provide functions to return an alternate value to NULL. See whether your SQL engine supports either ISNULL or COALESCE. https://www.w3schools.com/SQL/func_sqlserver_isnull.asp https://www.w3schools.com/SQL/func_sqlserver_coalesce.asp
3rd Apr 2022, 3:34 AM
Brian
Brian - avatar