Home > database >  Date is
Date is

Time:02-26

There are two date fields in the table, D1 and D2,
Compared with D2, maximizing the D1, and then take two of the largest date value

CodePudding user response:

The maximum with Max

again compared to D2
This is and D2 than that? Each row is the biggest?

CodePudding user response:

The SELECT MAX (DT)
The FROM
(SELECT MAX (D1) AS DT FROM TABLE
The UNION
The SELECT MAX (D2) FROM the AS A TABLE)

CodePudding user response:

If there is a conditional def, how do you add?
  • Related