USING IFNULL

Question

Q3.you have given a tabled name “Department”.  Write a query to replace “not provided” where there is null in the below table and then show the department manager column.

 

Dept_no Dept_name Dept_manager
D001 Marketing Aman
D002 Finance Ashika
D003 Human resource Abhishek
D004 Production Vivek
D005 Research Null
D006 Sales Null
D007 Customer care Null
in progress 0
Aman rathore 55 years 1 Answer 786 views Member 0

Answer ( 1 )

  1. Ans.
    Select
    Dept_manager,
    IFNULL( Dept_manager , ‘Not provided’ ) as Dept_manager
    From
    Department ;

Leave an answer

Browse
Browse