Solved SQL Query (List the computers which have warranties)

November 28, 2012 at 03:54:27
Specs: Windows 7

List the computers which have warranties expiring within a year.

How do I put this in a SQL Query?

select computer_id,datediff(day,warranty_expiration,getdate())as daysleft
from computers;

This would show computer id and the days left but I don't know how to find the exact answer.


See More: SQL Query (List the computers which have warranties)

Report •


#1
November 28, 2012 at 04:42:29
✔ Best Answer

You need to add a WHERE clause to your query.

Report •
Related Solutions


Ask Question