两种方法:

##SELECT device_id,university from user_profile where university='北京大学';
select device_id,university from user_profile where university like '%北京%'