SELECT device_id, gender, age, university FROM user_profile WHERE university!="复旦大学"

除了我自己的写法还有网友给的: SELECT device_id, gender,age,university FROM user_profile WHERE university NOT IN ("复旦大学")