一个表中,有数量a  和单价b  表名c怎么把总介为10 的显示出来? 

解决方案 »

  1.   

    select a,b from c where a*b = 10
      

  2.   

    还有一问题表中有相同的行  相同的行只显示一个  但价格要显示,下面这样?select a,b from c where sum(a*b) = 10
      

  3.   


    SELECT DISTINCT b,a from c where sum(a*b) = 10
    试试,DISTINCT关键字列出唯一记录
      

  4.   

    select distinct * from c where a*b=10;
      

  5.   

    select distinct * from c where a*b=10;这个是对的