摘要: /****** Script for SelectTopNRows command from SSMS ******/ SELECT B.[GOODSID] ,A.INDUSTRY_CNAME ,C.[PRODUCTTYPE_NAME] ,'TMALL' AS "??" ,D.[BRAND_NAME] ,E.[PROVI... 阅读全文
posted @ 2017-01-05 16:28 _Nestling 阅读(5933) 评论(0) 推荐(0) 编辑
摘要: 例如下表格:表名:fruit 当我想获取Name不重复的数据,结果如下 如果查询时用 distinct,则无效果,只能用group by. select * from fruit where id in (select min(id) from fruit group by Name); selec 阅读全文
posted @ 2017-01-05 16:25 _Nestling 阅读(310) 评论(0) 推荐(1) 编辑