title: how to check condition while creating view in sql
body: <p>I am creating a view with joining 2 tables.
  I have a column license in which I have grouped it to a single cell with a separator. The license field may have null values for the corresponding service in the referring tables.  so while viewing the license column for a particular agent it should show null values along with the separator. </p>
  
  <p>For example , agent <code>id = 802</code> , His service column is grouped with many services with a separator which looks like </p>
  
  <pre><code>Mututal Funds||Investments||Life Insurance||Personal Loan
  123456       ||NULL       ||34567         ||NUL
  </code></pre>
  
  <p>where license value for Investments and persoanl loan is NULL but what i get is <strong>123456||34567</strong>  the null values are rejected automatically ... but i need Null to be included in resultset .... My Query is </p>
  
  <pre><code>CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER 
  VIEW `v_agent_service` AS 
  select `a`.`agent_id` AS `agent_id`,
         group_concat(`a`.`license`separator '||') AS `license`,
         group_concat(`s`.`service_name` separator '||') AS  `service_names` 
  from 
  (`agent_service` `a` left join `service` `s` 
  on((`s`.`service_id`  = `a`.`service_id`)))
  group by `a`.`agent_id`;
  </code></pre>