Select with date greater than 20 years

2

How to make a select with request date greater than 20 years ?

Select * 
from Pedidos
Where dataPedido > ...
    
asked by anonymous 02.06.2016 / 22:33

1 answer

6
Select * 
from Pedidos
Where dataPedido > DATEADD (yy, -20, GETDATE());

See more here .

    
02.06.2016 / 22:40