我对此查询有疑问:
我想删除用户名和 upload_time 特定的记录。
这是我的查询:
DELETE FROM [upload_news]
WHERE (SELECT MIN[upload_time]
FROM [upload_news]
WHERE [username]='"+username+"');
我该如何做到这一点?
答案 0 :(得分:1)
像这样改变
DELETE FROM [upload_news] WHERE upload_time=
(SELECT min(upload_time) FROM [upload_news] WHERE
[username]='"+username+"')