breemermatta
Programmer
Hi,
I want to create a stored procedure that deletes none, one or multiple posts from a table if the date in the table is older then 10 minutes. how do I do this?
The table (Users) contains UserID, Username and loginDateTime.
I have tried this code:
DELETE FROM Users
WHERE (SELECT DATEDIFF(mi, loginDateTime, getdate()) AS mins FROM Users) > 10
Why doesn't it work?
I want to create a stored procedure that deletes none, one or multiple posts from a table if the date in the table is older then 10 minutes. how do I do this?
The table (Users) contains UserID, Username and loginDateTime.
I have tried this code:
DELETE FROM Users
WHERE (SELECT DATEDIFF(mi, loginDateTime, getdate()) AS mins FROM Users) > 10
Why doesn't it work?