本文介绍了获得独特的记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
i need to display Distinct Records Col1 Col2 Col3 Col4 A 1 2 1 A 1 2 2 A 2 1 1 A 2 1 2 B 3 2 2 B 3 1 1 Need Result Like Col1 Col2 Col3 Col4 A 1 2 1 2 1 2 B 3 2 2 1 1 Please Help Me......
推荐答案
你可以不要对任何RDBMS这样做,因为你想要的不是独特的记录结果。它是数据的多级主从细节表示。请注意,查询结果是一个集合,因此(即使您可以进行有序演示),当订单发生变化时,您也无法获得无意义的结果。查看结果集并假设您随机交换行。 因此,您必须在更高级别上实现此演示,例如在应用程序表示层(GUI)中。 You can''t do that with any RDBMS, since what you desire is not "distinct record" result. It is a multilevel master-detail representation of your data. Please note that the query result is a set, thus (even if you can have ordered presentation) you can''t have a result that has no meaning when the order is changed. Look at your result set and imagine that you swap rows randomly. So you will have to achieve this presentation on a higher level, like in your application presentation layer (GUI).
更多推荐
获得独特的记录
发布评论