We've been given a table that has been filled with data:
CREATE TABLE Hotel (hotelNo NUMBER(4) NOT NULL ,hotelName VARCHAR2(16) NOT NULL ,hotelAddress VARCHAR2(40) NOT NULL ,PRIMARY KEY (hotelNo) ); .... other tables don't directly affect question 1
For all hotels in London, list...
The example SQL that I was told to use by my instructor is:
SELECT * FROM Hotel WHERE hotelAddress LIKE 'London';
When I run the table creation and fill the columns with data, I run the above SELECT code and it says "no rows selected". I'm not sure how, without the use of REGEX, I'm supposed to find the columns that contain London at the end of the address.
The hotels that contain London in the address (which have already been created) are as follows:
INSERT INTO Hotel VALUES (1, 'Grosvenor Hotel', '100 Oxford Road, London'); INSERT INTO Hotel VALUES (3, 'Holiday inn', '56 Edinburgh Square, London'); INSERT INTO Hotel VALUES (9, 'Royale London', '500 Cambridge Road, London');
Is my SELECT code missing something that I just can't find?