Products Support Documentation Download
Working with an Existing Database

In order to work with an existing database, you need to open it first. rdm-sql lets you open a database in two ways - by specifying the database name with a command-line option or by issuing a USE SQL statement.

Navigate to your working directory where you saved the bicycle_db database. Start rdm-sql with the following command-line argument.

$ rdm-sql --database BICYCLE_DB

Or start rdm-sql with no command-line arguments and issue the following USE statement at the rdm-sql prompt.

rdm-sql: USE bicycle_db;

Now you’re ready to work with the bicycle_db database. Let's execute a query to make sure the database contains the data that you entered.

Execute the following SQL statement at the prompt.

rdm-sql: SELECT, b.model, b.type FROM manufacturer m LEFT JOIN bicycle b
rdm-sql> ON = b.make;
Cannondale | Synapse | Road
Specialized | *NULL* | *NULL*
Trek | Domane | Road
Trek | FX | Hybrid
*** 4 row(s) returned

Type ".q" at the prompt to quit rdm-sql.

rdm-sql: .q