I got a table Assignments which contains the logs if a user is assigned with a quiz.What I want is to select the latest user_id's. How do I do this? Thanks in advance!
P.S. I want the unique id's with the latest created fields
I got a table Assignments which contains the logs if a user is assigned with a quiz.What I want is to select the latest user_id's. How do I do this? Thanks in advance!
P.S. I want the unique id's with the latest created fields
There's not a lot of information to go on but maybe
SELECT * FROM table WHERE user_id = (SELECT MAX(user_id) FROM table)
Hi, this is alternative
SELECT TOP 1 *
FROM table
ORDER BY user_id DESC