Zoo tutorials: [ SQL | Linux | XML ]
ProgZoo: [ Java | C# | VB | C++ | Perl ]
Log in

A Gentle Introduction to
C++ Programming

Tutorial: Reading from a Database

 

1. Using SELECT .. WHERE


Big

We access data from a MySQL database. We use the table bbc which contains details of countries of the world.

Change the program so that shows name and population for 'Brazil'

2. Iterating over a result set


Big

The call cursor.next() returns a value. It is true if there is another row to be processed, it returns false when the end of the result set has been reached.

Change the program so that shows name for all the countries of 'South America'

3. Total population of South America


Big

You can calculate totals in SQL - but for this question please use Java to do the addition.

Find the total population of South America.