Skip to Content
初めてのSQL 第3版
book

初めてのSQL 第3版

by Alan Beaulieu, 株式会社クイープ
July 2021
Intermediate to advanced
376 pages
6h 34m
Japanese
O'Reilly Japan, Inc.
Content preview from 初めてのSQL 第3版

付録B練習問題の解答

3章

3-1
俳優全員の俳優ID、ファーストネーム、ラストネームを取得し、最初はラストネームで、続いてファーストネームで並べ替えてみよう。
mysql> SELECT actor_id, first_name, last_name
    -> FROM actor
    -> ORDER BY 3,2;
+----------+-------------+--------------+
| actor_id | first_name  | last_name    |
+----------+-------------+--------------+
|       58 | CHRISTIAN   | AKROYD       |
|      182 | DEBBIE      | AKROYD       |
|       92 | KIRSTEN     | AKROYD       |
|      118 | CUBA        | ALLEN        |
|      145 | KIM         | ALLEN        |
|      194 | MERYL       | ALLEN        |
......
|       13 | UMA         | WOOD         |
|       63 | CAMERON     | WRAY         |
|      111 | CAMERON     | ZELLWEGER    |
|      186 | JULIA       | ZELLWEGER    |
|       85 | MINNIE      | ZELLWEGER    |
+----------+-------------+--------------+
200 rows in set (0.00 sec)
3-2
ラストネームが'WILLIAMS'または'DAVIS'に等しい俳優全員の俳優ID、ファーストネーム、ラストネームを取得してみよう。
mysql> SELECT actor_id, first_name, last_name ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

初めてのGo言語 ―他言語プログラマーのためのイディオマティックGo実践ガイド

初めてのGo言語 ―他言語プログラマーのためのイディオマティックGo実践ガイド

Jon Bodner, 武舎 広幸

Publisher Resources

ISBN: 9784873119588Other