| CREATE PROCEDURE cayenne_tst_select_proc (IN p1 varchar(200), IN p2 DECIMAL) | |
| BEGIN | |
| UPDATE PAINTING SET ESTIMATED_PRICE = ESTIMATED_PRICE * 2 | |
| WHERE ESTIMATED_PRICE < p2; | |
| SELECT DISTINCT A.ARTIST_ID, A.ARTIST_NAME, A.DATE_OF_BIRTH | |
| FROM ARTIST A, PAINTING P | |
| WHERE A.ARTIST_ID = P.ARTIST_ID AND | |
| RTRIM(A.ARTIST_NAME) = p1 | |
| ORDER BY A.ARTIST_ID; | |
| END |