Subject Return variables of stored procedures from a select
Author Andres Eguiguren
I want to create a stored procedures that returns a matrix using
column names resulting from a select.
I have a database with two tables: countries and cities (with
population of each one).

I need a report that combines in the first column all countries and
the next columns should be the cities. For each cell in the matrix
must appear population of the city or null (0).

Could anyone help me? Thanks in advance for your help