How to use conditional select query in SQL Server ?
I have a column in which I store date type variable. Now I should retrieve one value from that column and find the difference with the current_timestamp and if the difference is less than 10 mins I should a return 1 and if more than 10 mins I should return 0.
Is this possible ?
05-12-2010 13.58.30 - 05-12-2010 13.56.30
here the difference is 2 so it should return 1.