在mysql中,查询某字段为空时,切记不可用 = null,

而是 is null,不为空则是 is not null


www.2cto.com   
  select * from table where column is null; 

select * from table where column is not null;

UPDATE investors a INNER JOIN phases s ON s.investor_id=a.id SET a.phase_id=s.id;  #把a里当s.investor_id=a.id的数据的a.phase_id置为s.id 。