我有一个桌子market_place_design,它有不同的市场和设计。 1设计存在于不同的市场。 我有另一个表temp只有列设计填写它。 现在加入表后我得到了单个设计的多个数据,而我只需要1个顶部(1)就可以了。 但是前1个如果我选择多个设计,则不起作用。
i have a table market_place_design which has different market places and designs. 1 design exists in different market places. I have another table temp which has only column design filled in it. Now after joining the tables i am getting multiple data for a single design whereas i need only 1 top(1) to be precise. But top 1 does not work if i am selecting multiple design.
推荐答案试试这个: Try this: SELECT DISTINCT * FROM Tmp Tmp inner JOIN MARKET_PLACE_DESIGN_RELATION MPDR ON MPDR.MARKET_PLACE_DESIGN=Tmp.MarketDesign
http:/ /www.w3schools/sql/sql_distinct.asp [ ^ ]