Lurker News

Comments (112) 38 threads

Show all comments

Showing thread 20 of 38

zitterbewegung1 reply#
I have picked up SQL and statements from my time in industry. I really like how this book provides not only interaction but a dataset that actually means something. Also, interactive systems like this for teaching are amazing! I learned about how "_" is a wildcard for one character (I have been making do with % for LIKE statements).
krylon#
I only recently learned that LIKE also supports something vaguely similar to regex character classes:

    SELECT * FROM customers
    WHERE company_name LIKE 'foo[lt]'
will only return customers whose company_name is 'fool' or 'foot', while

    SELECT * FROM customers
    WHERE zipcode LIKE '12[^30]45'
will return customers whose zipcode is LIKE '12_45', except '12345' and '12045'.