Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende DROP and TRUNCATE | DDL y DML en SQL
SQL Intermedio
course content

Contenido del Curso

SQL Intermedio

SQL Intermedio

1. Agrupamiento
2. Subconsultas Anidadas
3. Uniendo Tablas
4. DDL y DML en SQL

book
DROP and TRUNCATE

It's worth mentioning two more operations in DDL: DROP and TRUNCATE.

DROP: Used to delete database objects such as tables, databases, and indexes.

TRUNCATE: Removes all rows from a table but preserves the table's structure.

We've used these operations to clear or delete tables to check tasks in previous chapters:

Es importante mencionar dos operaciones más en DDL: DROP y TRUNCATE.

Veamos brevemente qué hace cada una de estas operaciones:

DROP: Se utiliza para eliminar objetos de la base de datos como tablas, bases de datos e índices.

TRUNCATE: Elimina todas las filas de una tabla pero conserva la estructura de la misma.

He utilizado estas operaciones para limpiar o eliminar tablas al verificar tareas en capítulos anteriores. Su sintaxis es bastante simple; veámoslas:

1
TRUNCATE TABLE employees;
copy
question mark

What is the main difference between DROP TABLE and TRUNCATE TABLE operations?

Selecciona la respuesta correcta

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 4. Capítulo 3
We're sorry to hear that something went wrong. What happened?
some-alt