SlideServe
Menu
Préférences
© SlideServe · v2026

DATA MANIPULATION LANGUAGE (DML)

upton-fletcher avatar
13 diapositives · 613 Views · Nov 21, 2014

DATA MANIPULATION LANGUAGE (DML). DATA MANIPULATION. There are the standard Data Manipulation Language (DML) elements. DML is the subset of the language used to add, update and delete data: INSERT DELETE UPDATE. INSERT.

DATA MANIPULATION LANGUAGE (DML) - slide 1
01 / 13DATA MANIPULATION LANGUAGE (DML)
1 / 17

Télécharger la présentation

DATA MANIPULATION LANGUAGE (DML)
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. DATA MANIPULATION LANGUAGE (DML)

  2. DATA MANIPULATION • There are the standard Data Manipulation Language (DML) elements. • DML is the subset of the language used to add, update and delete data: • INSERT • DELETE • UPDATE

  3. INSERT • INSERT is used to add rows (formally tuples) to an existing table, for example: SYNTAX INSERT INTO "table_name" ("column1", "column2", ...)VALUES ("value1", "value2", ...)

  4. SQL INSERT STATEMENT Example INSERT INTO Employees VALUES ( ‘05 ’,’Vasquez, Djoanna Marie’) INSERT INTO Employees (Name) VALUES (‘Vasquez, Djoanna Marie ’)

  5. SQL DELETE STATEMENT • DELETE removes zero or more existing rows from a table DELETE FROM "table_name"WHERE {condition} Example: DELETE FROM Orders Where Product =‘Printer’

  6. DELETE ALL ROWS • It is possible to delete all rows in a table without deleting the table. This means that the table structure, attributes, and indexes will be intact: Syntax DELETE FROM table_name Or DELETE * FROM table_name

  7. SQL UPDATE Statement • UPDATE is used to modify the values of a set of existing table rows Syntax UPDATE table_name SET column_name = new_value WHERE column_name = some_value

  8. Person We want to add a first name to the person with a last name of "Rasmussen": UPDATE Person SET FirstName = 'Nina‘ WHERE LastName = 'Rasmussen‘ Result:

  9. Update Several Columns in a Row We want to change the address and add the name of the city: UPDATE PersonSET Address = 'Stien 12', City = 'Stavanger‘ WHERE LastName = 'Rasmussen‘ Result

  10. EXERCISES

  11. Exercises • Insert the following records in the Branch table. (B009, 34 Fish Rd, Aberdeen) • Insert the following records in the Properties table.(PG18, 56 Lawrence St, Glasgow, House, 3, 700) • Delete all houses located in Glasgow. • Delete all properties whose number of rooms is greater than 4 • Delete all the records in the Branch table.

  12. 6. Delete all staff who was born from 1958 to 1970 7. Change the last name of Mary Howe to Mary White 8. Increase the salary of all employees by 5% 9. Increase the salary of Assistants by 5% 10.Change all properties to houses whose type is flat and located in Glasgow

  13. GOOD DAY!!! HOPE YOU HAVE LEARNED SOMETHING TODAY..