Difference between revisions of "SELECT basics/ja"
Jump to navigation
Jump to search
Kobashi.kaz (talk | contribs) (→Introducing the world table of countries: translate into Japanese) |
Kobashi.kaz (talk | contribs) (→Scandinavia: transelate into Japanese) |
||
Line 35: | Line 35: | ||
</div> | </div> | ||
− | == | + | ==スカンジナビア== |
<div class='qu'> | <div class='qu'> | ||
− | + | キーワード <b>IN</b> のリストで、アイテムがリスト中に有れば確認できる。 | |
− | + | 例としてブラジル、ロシア、インド、中国の国名と人口を表示している。 | |
− | <div class='imper'> | + | <div class='imper'>Sweden と Norway と Denmark の国名 name と人口 population を表示する</div> |
Revision as of 21:18, 5 April 2018
Language: | [[:{{#invoke:String|sub|SELECT basics/ja
|1 |Expression error: Unrecognized punctuation character "{".}}|English]] |
---|
name | continent | area | population | gdp |
---|---|---|---|---|
Afghanistan | Asia | 652230 | 25500100 | 20343000000 |
Albania | Europe | 28748 | 2831741 | 12960000000 |
Algeria | Africa | 2381741 | 37100000 | 188681000000 |
Andorra | Europe | 468 | 78115 | 3712000000 |
Angola | Africa | 1246700 | 20609294 | 100990000000 |
.... |
world
テーブルの国々の導入
WHERE 節の使用例としてフランス France の人口 population を表示している。
注)文字列(短いテキストデータ)はこの様に'シングルクオート'で囲む。
ドイツ(Germany)の人口(population)を表示するように修正
SELECT population FROM world
WHERE name = 'France'
SELECT population FROM world
WHERE name = 'Germany'
スカンジナビア
キーワード IN のリストで、アイテムがリスト中に有れば確認できる。 例としてブラジル、ロシア、インド、中国の国名と人口を表示している。
Sweden と Norway と Denmark の国名 name と人口 population を表示する
SELECT name, population FROM world
WHERE name IN ('Brazil', 'Russia', 'India', 'China');
SELECT name, population FROM world
WHERE name IN ('Sweden','Norway', 'Denmark');
Just the right size
Which countries are not too small and not too big?
BETWEEN
allows range checking (range specified is inclusive of boundary values). The example below shows countries with an area of 250,000-300,000 sq. km. Modify it to show the country and the area for countries with an area between 200,000 and 250,000.
SELECT name, area FROM world
WHERE area BETWEEN 250000 AND 300000
SELECT name, area FROM world
WHERE area BETWEEN 200000 AND 250000
- You are ready for tutorial one:SELECT statements with WHERE.
Language: | [[:{{#invoke:String|sub|SELECT basics/ja
|1 |Expression error: Unrecognized punctuation character "{".}}|English]] |
---|