Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
MySQL テーブルから max(date) を選択し、日付と時刻の各部分を個別の変数にする必要があります。
何かのようなもの:
select max(date) as year, month, day, hour, minute, second from table
どうすればいいですか?
次の方法で実行できます。
SELECT YEAR ( MAX(date) ) as year, MONTH ( MAX(date) ) as month, DAY ( MAX(date) ) as day, HOUR( MAX(date) ) as hour, MINUTE( MAX(date) ) as minute, SECOND( MAX(date) ) as second from table