artigelekser — 2011-09-06T11:40:11-04:00 — #1
So I have MySQL Workbench, and the "world" database that comes with it as sample data. Now I have to find all countries that has the letter "W" as the middle character in the land codes in the database.
SELECT Code (with letter W as middle character)
How could I do this?
artigelekser — 2011-09-07T10:19:57-04:00 — #2
Of course, I guess I took for granted that "land codes" are always three characters.
r937 — 2011-09-06T15:41:08-04:00 — #3
if it's a three-character code, yes, that'll do it
but we didn't know what size it was, did we, which is why i asked for a SHOW CREATE TABLE
r937 — 2011-09-06T13:48:51-04:00 — #4
could you please do a SHOW CREATE TABLE for the country table
artigelekser — 2011-09-06T14:08:47-04:00 — #5
Home ... work?
I guess it could be done with '%W%' or similar, but thanks anyway.
artigelekser — 2011-09-06T14:48:34-04:00 — #6
SELECT Name, Code
WHERE Code like '_W_'