no image
2) Syntax of SQL [UPDATE, DELETE FROM, INSERT INTO]
Summary of Important SQL commands SELECT extracts data from a DB UPDATE updates data in a DB DELETE deletes data from a DB INSERT INTO inserts new data into a DB CREATE DATABASE creates a new DB ALTER DATABASE modifies a DB CREATE TABLE creates a new table ALTER TABLE modifies a table DROP TABLE deletes a table CREATE INDEX creates an index (search key) DROP INDEX deletes an index UPDATE used to..
2021.12.30
1.5) Syntax of SQL [LIMIT, MIN/MAX, COUNT/AVG/SUM, Subquery]
Summary of Important SQL commands SELECT extracts data from a DB UPDATE updates data in a DB DELETE deletes data from a DB INSERT INTO inserts new data into a DB CREATE DATABASE creates a new DB ALTER DATABASE modifies a DB CREATE TABLE creates a new table ALTER TABLE modifies a table DROP TABLE deletes a table CREATE INDEX creates an index (search key) DROP INDEX deletes an index LIMIT used to ..
2021.12.30
no image
[SQL Zoo] SELECT from Nobel
1. Create a query that displays Nobel prizes for 1950 SELECT * FROM nobel WHERE yr = 1950 2. Show who won the 1962 prize for Literature SELECT winner FROM nobel WHERE yr = 1962 AND subject = 'Literature' 3. Show the year and subject that won 'Albert Einstein his prize SELECT yr, subject FROM nobel WHERE winner = 'Albert Einstein' 4. Give the name of the 'Peace' winners since the year 2000, inclu..
2021.12.28
no image
[SQL Zoo] SELECT basics
1. The example uses a WHERE clause to show the population of 'France'. Note that strings (pieces of text that are data) should be in 'single quotes'; Modify it to show the population of Germany SELECT population FROM world WHERE name = 'Germany' 2. Checking a list The word IN allows us to check if an item is in a list. Show the name and the population for 'Sweden', 'Norway' and 'Denmark'. SELECT..
2021.12.28
1) Syntax of SQL [SELECT, WHERE, ORDER BY]
Summary of Important SQL commands SELECT extracts data from a DB UPDATE updates data in a DB DELETE deletes data from a DB INSERT INTO inserts new data into a DB CREATE DATABASE creates a new DB ALTER DATABASE modifies a DB CREATE TABLE creates a new table ALTER TABLE modifies a table DROP TABLE deletes a table CREATE INDEX creates an index (search key) DROP INDEX deletes an index SELECT selects..
2021.12.27