Example statements for database connection points using MySQL
This is an example about how to read data from, and store data in, the database, without exception handling and without updating existing row(s).
This table shows the records in the Orders table:
orderNumber | orderStatus |
---|---|
1 | new |
2 | in process |
3 | completed |
This table shows the records in the OrderLine table:
orderNumber | lineNumber | item | quantity | price |
---|---|---|---|---|
1 | 1 | VW Polo | 1 | 10000.00 |
2 | 1 | hubcap | 4 | 100.00 |
2 | 2 | tire | 4 | 400.00 |
3 | 1 | battery | 1 | 90.00 |