Mysql 如何对Varchar2和Null值的记录求和?
在我的表格中,我有相同的日期,但发票号和空值不同。如何在第一个位置和日期显示1200.00 以下是查询:Mysql 如何对Varchar2和Null值的记录求和?,mysql,sql,Mysql,Sql,在我的表格中,我有相同的日期,但发票号和空值不同。如何在第一个位置和日期显示1200.00 以下是查询: select invoice_date, invoice_no_pwal, invoice_value, payment_rec from partywise_accounts_ledger where name_of_the_customer = 'Naresh Agencies' 当两行的column1字段相等时,将首先按column1(降序)排序,然后按column2(升序,这是默
select invoice_date, invoice_no_pwal, invoice_value, payment_rec
from partywise_accounts_ledger
where name_of_the_customer = 'Naresh Agencies'
当两行的column1字段相等时,将首先按column1(降序)排序,然后按column2(升序,这是默认值)排序
祝你好运
参考资料:只需按日期字段分组……学校作业?varchar2真的是MySQL类型吗?
ORDER BY column1 DESC, column2