11.4.2.4 describe the basic SQL queries for working with one table in a database: SELECT, UPDATE, INSERT, and DELETE 11.4.2.5 use SQL SELECT for data selection in more tables SQL queries. Data Manipulation Language.
The SQL SELECT Statement The SELECT statement is used to select data from a database.
Additionally: SQL ORDER BY Keyword, SQL AND, OR, and NOT Operators The SQL INSERT Statement The INSERT command is used to enter records into a table. Values are entered into the table corresponding order to the listed columns.
SQL UPDATE Statement The UPDATE statement is used to modify the existing records in a table.
SQL DELETE Statement The DELETE statement is used to delete existing records in a table.
SELECT from several tables If you need to select data from two or more related tables, then for each field you need to specify the table name and add the equality of fields related by a foreign key to the selection conditions. Example,
Task. Write an SQL statement to select all appointments to room 204 to get the next output:
Decision: SELECT Dentist.dentist_surname, Patient.patient_surname, Patient.patient_firstname, Appointments.date Video 2. SQL queries. Add records into table Video 3. SQL queries: SELECT, UPDATE, DELETE
Questions: Exercises: Ex. 1 (Author: Litvinova Olga - CS teacher of NIS Pavlodar) Ex. 2 Test SELECT (Ex. 1-3) on w3schools.com Test WHERE (Ex. 1-5) on w3schools.com Test UPDATE (Ex. 1-3) on w3schools.com Test DELETE (Ex. 1-2) on w3schools.com Ex. 3 SQLZOO - TASK 1 "SELECT basics" SQLZOO - TASK 2 "SELECT from WORLD" SQLZOO - TASK 3 "SELECT from Nobel" Ex. 4 Ex. 5 Ex. 6 Ex. 7 https://www.101computing.net/sql/sql-1.html Ex. 8 (Author: Ermekova Ainagul - CS teacher of NIS Pavlodar) Ex. 9 SQL Investigation: The Stolen Gemstones (Link) Exam questions:
| |||||||||||||||||||||
| |||||||||||||||||||||
Просмотров: 7436 | | |
Всего комментариев: 0 | |