-1
I have a table where move balance (deposits and withdrawal), but in a field of the site need to bring only the balance of the first deposit.
It would be something like that:
select saldo from historico where id = :id and (algum filtro)
I’ve tried with top 1
, and limit 0,01
but it was a mistake.
What is the database server? Mysql, Oracle, ...
– Costamilam
To recover the data from the first deposit take the record with the oldest date. Do not rely on the order in which the DBMS retrieves the records because, depending on the DBMS, it will not necessarily be in the same order in which they were recorded.
– anonimo
It would mysql the database
– Gabriel Alves