题解 | #查找除复旦大学的用户信息#

查找除复旦大学的用户信息

http://www.nowcoder.com/practice/c12a056497404d1ea782308a7b821f9c

where就行啊 != 代表不等于

select device_id, gender, age, university
from user_profile
where university != '复旦大学'
全部评论
因为select* 会影响效率,因为是查找全表的信息,所以不要这么用,要不公司会扣你钱哈哈
6 回复 分享
发布于 2022-02-27 20:23
我也这么写,怎么也报错了???
3 回复 分享
发布于 2022-06-24 10:28
为什么复旦大学要用括号括起来
2 回复 分享
发布于 2022-05-06 16:48
!=会导致索引失效吧
1 回复 分享
发布于 2022-04-22 19:21
我更喜欢用 <> 表示不等于,哈哈
1 回复 分享
发布于 2021-11-05 17:23
推荐用<>表示不等于,因为有些版本不支持!=
点赞 回复 分享
发布于 04-27 21:50 江西
我也是这样 报错了
点赞 回复 分享
发布于 04-01 10:37 上海
可以用not like
点赞 回复 分享
发布于 2024-07-17 19:32 广东
我这么写的 但是报错
点赞 回复 分享
发布于 2023-09-26 09:41 天津
会提示数组越界啊?
点赞 回复 分享
发布于 2022-10-21 01:55 北京
select device_id,gender,age,university from user_profile having university not in('复旦大学')
点赞 回复 分享
发布于 2022-10-13 17:16 浙江
SELECT device_id,gender,age,university FROM user_profile WHERE age is not null 我曲线救国总可以吧
点赞 回复 分享
发布于 2022-09-08 21:27 山西
select device_I'd, gender, age, university from user_profile where university not in ("复旦大学") 这个可以 但是为什么复旦大学要加引号和括号呀?
点赞 回复 分享
发布于 2022-07-02 21:01
这用户明指代有点不明确把
点赞 回复 分享
发布于 2022-05-10 22:39
用这种模式不好,可以从现在避免
点赞 回复 分享
发布于 2022-02-18 17:42
可以用select *啊
点赞 回复 分享
发布于 2022-02-07 16:35
为什么不能select *
点赞 回复 分享
发布于 2022-01-10 16:53

相关推荐

Z_eus:别打招呼直接发你的优势
点赞 评论 收藏
分享
评论
210
8
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务