0
I have a database with several records, since 2001
until 2010
. How do I select all tuples with dates after the day 2001-05-02
? Data is of the type character varying(254)
.
0
I have a database with several records, since 2001
until 2010
. How do I select all tuples with dates after the day 2001-05-02
? Data is of the type character varying(254)
.
2
Query using operator >
Example
SELECT * FROM
MinhaTabela
WHERE data > '2001-05-02'
If you wish to inform an interval with a certain period. You can use the operator BETWEEN
Example :
SELECT * FROM
FROM
MinhaTabela
WHERE
data BETWEEN dataInicial AND dataFinal
the problem was in the same simple quotes. thanks! :)
Browser other questions tagged sql postgresql date
You are not signed in. Login or sign up in order to post.
To prepare a query we need a reference ,for example a data_input field ?
– stringnome
wanted something like: select * from historico Where data > 2001-12-31. But it didn’t work that way.
– Jessica Costa
take a look at my answer there and it most likely was a syntax error even .
– stringnome