摘要: --试题如下--1. 请按照要求编写一段SQL:--有一个test表,表里的数据如下:--id name----------------------------------1 浙--2 江--3 聚--4 网--要求查询结果格式如下:----------------------------------浙江--浙聚--浙网--江聚--江网--聚网select a.name+b.name from table_1 a cross join table_1 b where b.id>a.id order by a.id,b.id---------------... 阅读全文
posted @ 2012-04-17 10:42 popoxxll 阅读(95) 评论(0) 推荐(0) 编辑
摘要: --两个截然不同SELECT isnull(max(ti_goods_count)- sum(isnull(sl_count,0)),0) as ti_goods_count, isnull(max(ti_goods_weight)-sum(isnull(sl_weight,0)),0) as ti_goods_weight, isnull(max(ti_goods_body)- sum(isnull(sl_body,0)),0) as ti_goods_body, isnull(max(ti_prepay_price)- sum(isnull(sl_prepay_price,0)),... 阅读全文
posted @ 2012-04-17 10:29 popoxxll 阅读(644) 评论(0) 推荐(0) 编辑