Skip to content

Latest commit

 

History

History
32 lines (19 loc) · 644 Bytes

2. Sentencias DML.md

File metadata and controls

32 lines (19 loc) · 644 Bytes

Sentencias DML

Data Manipulation Language

Operaciones CRUD:

  • ==C==: Create --> INSERT INTO
  • ==R==: Retrieve o Read --> SELECT FROM
  • ==U==: Update --> UPDATE
  • ==D==: Delete --> DELETE FROM

1. Recuperar datos (SELECT)

Recuperar todos los empleados:

SELECT * FROM employees;

2. Insertar nuevos datos (INSERT)

Insertar un nuevo empleado:

INSERT INTO employees (married, name, email, genre, salary, birth_date, start_at) VALUES (TRUE, 'Employee2', 'employee1@company.com', 'M', 29567.23, '1990-12-25', '08:30:00');

3. Actualizar datos (UPDATE)

4. Borrar datos (DELETE)