我在mysql数据库三个表选择最新记录,标题,描述,客房,价格更新]从多个表
土地 [ID,节,标题,描述,面积,价格,更新]
我需要从一个查询(id,title)这些表中的所有记录中检索四条最新记录,并且我不知道如何正确编写查询。我试过这个:
SELECT
flats.id, flats.title, houses.id, houses.title, lands.id, lands.title
FROM
flats, houses, lands
ORDER BY
updated DESC
LIMIT
3
感谢您的回复。
请澄清 - 你要4个记录_in total_,或4条从每个三个表? –
感谢您的回复。我想要4条记录。 – Mato