Single-Row Select Statements
Void getPrice() {
EXEC SQL BEGIN DECLARE SECTION;
char productName[20], company[30];
integer price;
char SQLSTATE[6];
EXEC SQL END DECLARE SECTION;
/* read value of product name */
EXEC SQL SELECT price
INTO :price
FROM Product
WHERE Product.name = :productName;
/* print out value of price */ }
Previous slide
Next slide
Back to first slide
View graphic version