oreacle select adjust_date as actime adjust_person as person from uf_adjust_history where adjust_person in + userid1 + 根据 actime 时间取最新的一条
To retrieve the latest record based on the 'actime' column, you can use the following query:
SELECT adjust_date AS actime, adjust_person AS person
FROM uf_adjust_history
WHERE adjust_person IN (" + userid1 + ")
ORDER BY actime DESC
LIMIT 1;
This query selects the 'adjust_date' as 'actime' and 'adjust_person' as 'person' from the 'uf_adjust_history' table. It filters the records based on the 'adjust_person' column using the provided 'userid1' value. The records are then ordered in descending order by 'actime' and limited to only retrieve the first record using 'LIMIT 1'
原文地址: https://www.cveoy.top/t/topic/iheC 著作权归作者所有。请勿转载和采集!