SQL

我希望可以用 整理雜物,從亂七八糟的房間找我剛好要用的東西。

SELECT location FROM home WHERE item_name = '錀匙';
SELECT location FROM bedroom WHERE item_name = '筆記簿' AND last_modified < parse_date('大約幾天前');
SELECT location FROM bedroom WHERE item_name = '證書' AND price IS NULL;
SELECT location FROM home WHERE item_name = '鉗' OR shape LIKE '%鉗%';

找東西找到發神經了。

2 thoughts on “SQL

  1. 我以往也有過類似的想法呢,但不只是找東西,而是更貪心的要找答案:

    SELECT f.name FROM friends f, event e WHERE f.id = e.fid AND e.event = ‘dinner’ AND date = ’01-02-2000′ AND remark LIKE ‘%late%’ AND reason = ‘fake’;

    (um…tables join 得不太好,但 concept 就是這個了 😛 )

Leave a Reply

Your email address will not be published. Required fields are marked *