Jump to content
Fórum Script Brasil
  • 0

Apresentar Somente Os 2 Ultimos Registros


rbordini
 Share

Question

3 answers to this question

Recommended Posts

  • 0
Pessoal,

Como faço para que minha conulta retorne somente os 3 registros que possuem o mais alto valor num determinado campo?

sds,

Abra uma consulta nomal, vai em exibir Modo SQL e coloque o codigo sql

ex: eu tenho um tabela que se chama tabela1, que possui o compo total e data

SELECT top 3 Tabela1.Total, Tabela1.data

FROM Tabela1 order by total desc;

beleza???

Ve ai, qualquer coisa retorne

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Forum Statistics

    • Total Topics
      150.7k
    • Total Posts
      648.4k
×
×
  • Create New...