Oct 16, 2024
*
can be used to select all fields.%
).Simple SELECT
SELECT population FROM world WHERE name = 'Germany';
Selecting Multiple Fields
SELECT name, continent, area, population, GDP, capital FROM world WHERE name = 'Algeria';
Selecting All Fields
SELECT * FROM world;
Complex WHERE Clause
SELECT * FROM world WHERE name LIKE 'A%' AND population > 1000000;
Using Nested SELECT Statements
SELECT name FROM world WHERE population > (SELECT population FROM world WHERE name = 'Algeria');
SELECT population FROM world WHERE name = 'Algeria';
returns 387,000.