开发者社区 问答 正文

sql查询相同ID的不同字段

screenshot
我想查询一条aucid=1的now__price(1600的)而不是三条,怎么写?

展开
收起
吴孟桥 2016-06-16 17:28:44 2546 分享 版权
1 条回答
写回答
取消 提交回答
  • select top 1 now__price from 表 where aucid=1

    select max(now__price) from 表 where aucid=1

    select max(now__price) from 表 where aucid=1 and price=1600

    2019-07-17 19:41:33
    赞同 展开评论
问答分类:
SQL
问答地址: