Select number of returned lines

Asked

Viewed 34 times

0

Is it possible to select the number of rows returned in a select? For example:

inserir a descrição da imagem aqui

In that case it would have to be returned 12.

  • you want only Count same as Giuliana posted ?

1 answer

2

Yes, it is possible through the function Count. The syntax is as follows:

select count(*) from tabela where condição;

The Count can also be used in conjunction with other functions to perform a more flexible line count (e.g. Count + group by).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.