0

我有三个表产品,具有相同创建日期列“创建”的事件。但是,如果任何用户向任何表格添加条目,则应从网页上的特定行显示详细信息。你能建议我吗,怎么做?

4

1 回答 1

0
SELECT *
FROM (SELECT col1, col2, date
      FROM table1
      ORDER BY date DESC
      LIMIT 1
      UNION
      SELECT col1, col2, date
      FROM table2
      ORDER BY date DESC
      LIMIT 1
      UNION
      SELECT col1, col2, date
      FROM table3
      ORDER BY date DESC
      LIMIT 1) u
ORDER BY date DESC
LIMIT 1
于 2013-10-25T10:36:08.133 回答