Select number of rows returned

0

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

In this case it would have to be returned 12.

    
asked by anonymous 12.03.2018 / 17:34

1 answer

2

Yes, it is possible through the count function. 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).

    
12.03.2018 / 17:38