(1) 今天发现,mysql5.5查询默认是不区分大小写的 

    select category ,ncRNA ,species ,cell ,immune_events ,COUNT(1) from functiondata where category = 'lncRNA' and ncRNA = 'linc01228' GROUP BY  category ,ncRNA ,species ,cell ,immune_events 

    select category ,ncRNA ,species ,cell ,immune_events ,COUNT(1) from functiondata where category = 'lncRNA' and ncRNA = 'LINC01228' GROUP BY  category ,ncRNA ,species ,cell ,immune_events 

得到的结果是一样的,我们可以这样处理

(2) 要让mysql查询区分大小写,可以使用如下方式:

    select category ,ncRNA ,species ,cell ,immune_events ,COUNT(1) from functiondata where category = 'lncRNA' and binary ncRNA = 'linc01228' GROUP BY  category ,ncRNA ,species ,cell ,immune_events 

    select category ,ncRNA ,species ,cell ,immune_events ,COUNT(1) from functiondata where category = 'lncRNA' and binary ncRNA = 'LINC01228' GROUP BY  category ,ncRNA ,species ,cell ,immune_events 
(3) 成功得到想要的数据。

Logo

更多推荐