Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Retrieving Individual Columns
course content

Course Content

Introduction to SQL

Retrieving Individual ColumnsRetrieving Individual Columns

What is SQL?

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

Database

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

Let’s get started! In this course, we will work with a country database containing a country table. Let's look at this table.

idnamecontinentregionsurfaceareacapitalpopulation
1JapanAsiaEastern Asia377829Tokyo126714000
2LatviaEuropeNULL64589Riga2424200
3MexicoNorth AmericaCentral America1958201Mexico City98881000
4NetherlandsEuropeWestern Europe41526Amsterdam15864000
5PortugalEuropeSouthern Europe91982Lisbon9997600
6SwedenEuropeNordic Countries449964StockholmNUll
7UkraineEuropeEastern Europe603700Kyiv50456000
8United StatesNorth AmericaNULL9363520Washington278357000
9ThailandAsiaNULL513115Bangkok61399000
10ParaguaySouth AmericaNorth America406752Asunción5496000
11PhilippinesAsiaSoutheas Asia300000Manila75967000
12New ZealandOceaniaAustralia and New Zealand270534Wellington18886000
13NorwayEuropeNordic Countries323877Oslo4478500
14MonacoEuropeWestern Europe1.50MonacoNUll
15MaltaEuropeSouthern Europe316Valletta380200

SELECT is an operator in the SQL language that retrieves a data set (sample) from the database. To use the SELECT operator effectively, we need to specify exactly what we want to select and where we want to select it from.

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.

Task

Now, let's retrieve a capital column from the country table.

Once you've completed this task, click the button below the code to check your solution.

Everything was clear?

Section 1. Chapter 1
toggle bottom row
some-alt