📜  mysql 日期时的情况 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:09.794000             🧑  作者: Mango

代码示例1
SELECT
  id,
  CASE
    WHEN date_activated > '2011-11-23 18:30:00' THEN 'after'
    WHEN date_activated > '2010-01-20 00:00:00' THEN 'before'
    ELSE 'not yet'
  END AS date_note
FROM table1;