打印

问一个SQL语句

本主题由 snwebsite 于 2008-6-20 08:21 移动
我设计了一张表,VoteTable 假设有3列,第一列是自动增长的id,第二列是topic,第三列是optionid
id   topic      optionid
1     好             1
2     好             2
3     好             3
4     不好           1
5     不好           2
6     非常好         1
7     非常好         2

现在我用查询出最后两行的数据,它的特点是id为最大的几行,这几行topic 内容一致,怎么查?