Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Retrieving Individual Columns | Section
Introduction to SQL
セクション 1.  1
single

single

bookRetrieving Individual Columns

メニューを表示するにはスワイプしてください

Before moving further with C#, it's important to understand how applications work with data. Most real-world software interacts with databases, and to communicate with them, developers use a query language called SQL.

In this section, you'll learn the fundamentals of SQL — how to retrieve, filter, sort, and modify data. This knowledge will give you a strong foundation for building data-driven applications in C# and help you better understand how backend systems operate in practice.

What is SQL?

Note
Definition

SQL is a programming language for user interaction with databases, used to query, update, and manage databases.

Database

Note
Definition

A database is an organized structure designed to store, modify, and process large amounts of data.

Why SQL Matters

SQL is essential for managing and querying databases efficiently. It is widely used due to its standardization, scalability, and ability to ensure data integrity. SQL's integration with other technologies makes it a versatile tool in various applications, supporting real-time data processing and decision-making.

Let's get started! In this course, we will work with a country database containing a country table. You can see it under the code editor on the right bottom corner.

SQL Syntax Explanation

To retrieve data from a database, SQL uses the SELECT statement. Here's the basic syntax:

  • SELECT: specifies the columns to retrieve;
  • FROM: specifies the table from which to retrieve the data.

For example, to get the sample column from the sample_table table, the syntax is:

SELECT sample FROM sample_table;

The following query will return all entries in the continent column from the country table:

1
SELECT continent FROM country;
copy

In our previous query, we utilized the SELECT to retrieve a single continent column from the country table. It's important to note that you must specify the column name immediately after the SELECT keyword, and the FROM keyword specifies the name of the table from which we wish to retrieve data.

タスク

スワイプしてコーディングを開始

Write an SQL query to retrieve the capital column from the country table. Replace the blanks in the starter code to select only the capital column from the correct table.

解答

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 1.  1
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt