Top Ten Programs
Read From a Database
|
Connection parameters
| value | description |
| 127.0.0.1 | the IP address database server; |
| gisq | the name of the database; |
| scott | user name; |
| tiger | the password; |
Read the name and population for each country
with a population of more than 200000000.
The SQL statement is:
SELECT name, population
FROM bbc
WHERE population>200000000
1. [ Python ] Read values from an SQL databaseYou can access other columns from the bbc table.
The columns are name region area
population and gdp.
test text
1. [ C++ ] Read values from an SQL database | |
You can access other columns from the bbc table.
The columns are name region area
population and gdp.
test text
1. [ C# ] Read values from an SQL databaseYou can access other columns from the bbc table.
The columns are name region area
population and gdp.
test text
1. [ Java ] Read values from an SQL databaseYou can access other columns from the bbc table.
The columns are name region area
population and gdp.
- You use the driver com.mysql.jdbc.Driver - this is available
from http://mysql.com
- You can connect to any database that supplies a jdbc or an odbc driver.
test text
1. [ Perl ] Read values from an SQL databaseYou can access other columns from the bbc table.
The columns are name region area
population and gdp.
test text
1. [ Ruby ] Read values from an SQL databaseYou can access other columns from the bbc table.
The columns are name region area
population and gdp.
test text
|