BD Lab DML


Databases
Computer Laboratory
DML
Dariusz Jankowski©
1 / 9
1. Introduction
Składnia polecenia INSERT (tylko jeden wiersz może być wstawiony)
- zwróć uwagę na sposób wstawiania danych liczbowych i tekstowych
Wstawianie wierszy z wartością NULL
Wstawianie specjalnych wartości
2 / 9
The TO_DATE function
Tworzenie skryptu
Kopiowanie wierszy z innych tabel
Składnia polecenia UPDATE
3 / 9
Zmiana danych w tabeli (jeden i wiele wierszy)
Aktualizacja dwóch wierszy z zastosowaniem pod-zapytań
4 / 9
Aktualizacja wierszy  bazowanie na innej tabeli
Najczęstsze błędy polecenia UPDATE
Składnia polecenia DELETE
5 / 9
Usuwanie wierszy z tabeli
Usuwanie wierszy  bazowanie na innej tabeli
Najczęstsze błędy polecenia DELETE
6 / 9
Użycie pod-zapytań w poleceniu INSERT
2. HR Schema
7 / 9
3. Exercises
Insert data into the EMPLOYEE_NRINDEKSU table.
1. Run the statement in the sql script to build the EMPLOYEE_NRINDEKSU table that will be
used for the lab.
2. Describe the structure of EMPLOYEE_NRINDEKSU the table to identify the column names.
3. Add the first row of data to the EMPLOYEE_NRINDEKSU table from the following sample data.
Do not list the columns in the INSERT clause.
4. Populate the EMPLOYEE_ NRINDEKSU table with the rows (of sample data) from the preceding
list. This time, list the columns explicitly in the INSERT clause.
5. Confirm your addition to the table.
Update and delete data in the EMPLOYEE_NRINDEKSU table.
1. Change the last name of employee 3 to Drexler.
2. Change the salary to 1000 for all employees with a salary less than 900.
8 / 9
3. Verify your changes to the table.
4. Delete Betty Dancs from the EMPLOYEE_NRINDEKSU table.
5. Confirm your changes to the table.
6. Commit all pending changes.
COMMIT;
7.Create the DEPT_ NRINDEKSU table based on the following table instance chart.
8. Populate the DEPT_ NRINDEKSU table with data from the DEPARTMENTS table. Include only
columns that you need.
9 / 9


Wyszukiwarka

Podobne podstrony:
BD Lab Tab
BD Lab indek
BD Lab ContUsr
BD Lab SET
Lab BD Wojciech Ćwikliński
BD W8
BD 2st 1 2 w01 tresc 1 1
Lab cpp
lab 2
T2 Skrypt do lab OU Rozdział 6 Wiercenie 3
IE RS lab 9 overview
BD
bd
lab pkm 3
lab chemia korozja
lab tsp 3

więcej podobnych podstron