The WHERE Clause Operators
メニューを表示するにはスワイプしてください
SQL supports a lot of conditional statements.
Less Than
Let's look at the examples:
This example lists all countries that have a population of less than 2424200:
123SELECT name, population FROM country WHERE population < 2424200;
Less Than or Equal to
The following example retrieves all countries with a population less than or equal to 2424200:
123SELECT name, population FROM country WHERE population <= 2424200;
Not Equal
The following example retrieves all non-Asian countries:
123SELECT name, continent FROM country WHERE continent<>'Asia';
1. Which query returns the names of countries with a population equal to 2,424,200 using the '=' operator in the WHERE clause?
2. Which SQL query returns all countries that are not in Europe using the '<>' operator?
3. Write a SQL query to select the country name and population for all countries with a population between 5,000,000 and 50,000,000, inclusive. Use the BETWEEN operator.
すべて明確でしたか?
フィードバックありがとうございます!
セクション 3. 章 3
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください
セクション 3. 章 3