manipulating dates in postgresql

0

I have a database with multiple records, from 2001 to 2010 . How do I select all tuples with dates after day 2001-05-02 ? Date is of type character varying(254) .

    
asked by anonymous 25.05.2016 / 20:37

1 answer

2

Query using > operator

Example

SELECT * FROM 
MinhaTabela
WHERE data > '2001-05-02'

If you want to report an interval with a certain period. You can use the BETWEEN

Example :

SELECT * FROM 
FROM 
MinhaTabela
WHERE 
data BETWEEN dataInicial AND dataFinal
    
25.05.2016 / 20:49