Any conditions

Report a typo

Suppose there is the following procedure:

CREATE PROCEDURE take_books(
    item_name VARCHAR(30),
    description VARCHAR(30))
BEGIN
    IF item_name = 'book' THEN
        INSERT INTO books(item, description) VALUES (item_name, description);
        IF description = 'The Hobbit' 
        OR description = 'Invisible Man'
        OR description = 'Sherlock Holmes'
        THEN
            INSERT INTO favorite_book(item, description) VALUES (item_name, description);
        END IF;    
    ELSE
        INSERT INTO other_items(item, description) VALUES (item_name, description);
    END IF;
END;

Then the following procedures are called:

CALL take_books('book', 'Tom Sawyer');

CALL take_books('glasses', 'Zeiss');

CALL take_books('umbrella', 'Rainbow');

CALL take_books('book', 'caramel');

CALL take_books('sweater', 'warm');

CALL take_books('book', 'Invisible Man');

CALL take_books('book', 'Don Quixote');

CALL take_books('newspaper', 'Times');

CALL take_books('book', 'The Hobbit');

Select the correct number of resulting entries in the tables.

Select one option from the list
___

Create a free account to access the full topic