
sqlserver
pengleong
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
分组统计商品一星期每天的销售情况
商品销售表(orders) 字段: 订单号(order_id int) 商品名(product_name nvarchar) 销售时间(sale_date int)记录星期如(1,2,3,4,5,6,7) 销售数量(sale_count int) 查询商品一星期每天的销售记录,如下方式显示 [table] |product_name|Sun|Mon|Tue|We...原创 2010-10-27 15:25:51 · 1047 阅读 · 0 评论 -
三种方式查询A表的数据没有出现在B表的数据中(not in, left join, not exists)
A表(users) 字段: uid int not null primary key, uname nvarchar(30) not null B表(results) 字段: rid int not null primary key, uid int not null(引用users表的uid) 查询A表中的数据没有出现在B表中 1.使用 not in [c...原创 2010-10-27 23:30:15 · 971 阅读 · 0 评论