Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
孊ぶ Using the OR operator | Section
Introduction to SQL

Using the OR operator

メニュヌを衚瀺するにはスワむプしおください

The OR operator is used to filter records based on more than one condition, like if you want to return all countries from Asia but also those from Europe.

Here is the syntax of using the OR operator:

SELECT columns
FROM table
WHERE column = 'first_option' OR column = 'second_option';

Let's look at the example:

123
SELECT name, population, continent, region FROM country WHERE continent = 'Asia' OR continent = 'Europe';
タスク

スワむプしおコヌディングを開始

Write an SQL query to retrieve the name of the countries that are from 'Asia' or 'North America' continent.

Note

Note that north america is not the same as North America, and asia is not the same as Asia. Be careful and write correctly: North America and Asia.

解答

Switch to desktop実践的な緎習のためにデスクトップに切り替える䞋蚘のオプションのいずれかを利甚しお、珟圚の堎所から続行する
すべお明確でしたか

どのように改善できたすか

フィヌドバックありがずうございたす

セクション 1. 章 30
single

single

AIに質問する

expand

AIに質問する

ChatGPT

䜕でも質問するか、提案された質問の1぀を詊しおチャットを始めおください

some-alt