您好,我有一个带有列的表:
*使用oracle
ID NUMBER USER_ID NUMBER DATE_ADDED DATE DATE_VIEWED DATE DOCUMENT_ID VARCHAR2 URL VARCHAR2 DOCUMENT_TITLE VARCHAR2 DOCUMENT_DATE DATE
我想知道如何获取给定用户的最新添加的文档。
Select * FROM test_table WHERE user_id = value AND (do something with date_added column)
谢谢
Select * FROM test_table WHERE user_id = value AND date_added = (select max(date_added) from test_table where user_id = value)