File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -351,6 +351,11 @@ WHERE
351351
352352> ⚠️ Es importante ** no olvidarnos del ` WHERE ` , si no vamos a modificar todas las filas de la tabla!** (salvo que estemos buscando hacer eso)
353353
354+ ``` SQL
355+ UPDATE users SET first_name = ' Elie' ; -- will update all users
356+ UPDATE users SET first_name = ' Elie' WHERE id = 1 ; -- will update a user with an id of 1
357+ ```
358+
354359También podemos modificar varios campos simultáneamente
355360
356361``` SQL
@@ -375,6 +380,11 @@ WHERE
375380 title = ' Gattaca' ;
376381```
377382
383+ ``` SQL
384+ DELETE FROM users; -- will delete all users
385+ DELETE FROM users WHERE id= 1 ; -- will delete a user with an id of 1
386+ ```
387+
378388> :warning : ** No te olvides de poner el ` WHERE ` en el ` DELETE FROM ` !**
379389
380390[ ![ ] ( https://img.youtube.com/vi/i_cVJgIz_Cs/0.jpg )] ( https://www.youtube.com/watch?v=i_cVJgIz_Cs )
You can’t perform that action at this time.
0 commit comments