重复记录,根据条件只取其中的一条记录的sql语句

id owner_type player_id type1 40 1050340 12001152 50 1050340 14001153 4 1050340 19001154 1 1050340 25001155 40 1050340 27001156 40 1050340 2600115 ID是随机的,不能用,如何判断 owner_type 与 player_id 字段得出 type 的值?

第1个回答  2013-08-20
select top 1 type from 表名 where owner_type='你的值' and player_id='你的值' order by type --desc
第2个回答  2013-08-20
select type from 表名where owner_type='你的值' and player_id='你的值'
第3个回答  2013-08-20
select type from table_name(你的表名) awhere a.owner_type='值1' and a.player_id='值2'
第4个回答  2013-08-20
and 连接一下两个值就行了
相似回答