SlideShare una empresa de Scribd logo
ADVERTENCIA

El siguiente contenido muestra como eliminar
   para siempre la información en la Base de
                     Datos.



               ACEPTAR;
UNIVERSIDAD CATOLICA
          DE TEMUCO
    FACULTAD DE INGENIERIA




EQUIPO “BLUEJEANS”

•   Lidia Bachsmann Riquelme
•   Nicole Rodríguez Rodríguez
•   Marcelo Carrasco
•   Gerardo Sepúlveda

CARRERA: Ing. Civil en Informática
¿Y si
                             escribo…




            ...
mysql> DELETE FROM Amigos;
            ?
OH!
Empty set?
*         OR


FROM




                                  NOT
       BETWEEN




                     AND   LIKE
Select * from <tabla> WHERE <campo1> LIKE “atributo1” OR <campo2> LIKE “atributo2”;


Select * from amigos WHERE hobbie LIKE “Pc” OR edad LIKE “16”;




Select * from <tabla> WHERE <campo1> LIKE “atributo1” AND <campo2> LIKE “atributo2”;

Select * from amigos WHERE hobbie LIKE “Pc” AND edad LIKE “20”;



                                       Por cada sentencia
                                      “Select”, un “Delete”
Select * from <tabla> WHERE <campo> NOT LIKE “atributo”;

  Select * from amigos WHERE hobbie NOT LIKE “Tv”;


                    DELETE FROM <TABLE> WHERE <CONDITION>


Select * from <tabla> WHERE <campo> BETWEEN “atributo1” AND “atributo2”;

  Select * from amigos WHERE edad BETWEEN “18” AND “20”;

                                    Por cada sentencia
                                   “Select”, un “Delete”
      BART
UPDATE <tabla> SET <campo> = “nuevo atributo” WHERE <campo> = “atributo”;


   UPDATE amigos SET hobbie=“musica” WHERE nombre = “Marcelo”;




UPDATE <tabla> SET <campo> =“N.atributo”, <campo>=“N.atributo “ WHERE <campo> = “atributo”;


    UPDATE amigos SET hobbie=“peliculas”, edad=“21” WHERE nombre = “Gerardo”;


                                         UPDATE:
                                     especifica Registro                         BART
Select   Update
Para que no pierdan los eventos
                           ¡Qué
                                      más importantes de la vida,
                          horror!
                                              actualizar:
                         ¡¡Papá!!




                                    mysql>


                                    UPDATE <TABLA>
                                    SET <ATRIBUTO>
                                    WHERE <CONDICION>;




“Para usar su tarjeta,
 actualice sus datos”
No olviden que:

1. El uso de “Delete y Update” requiere de
   mucha responsabilidad.

2. Los Comandos Complementarios ayudan
   a especificar lo que queremos borrar.

3. La fórmula perfecta para aprender:
   “Ensayo y error”

4. Es momento para el juego “Preguntas y
   respuestas”, jeje.
Muestra
Nombre    Edad     Sexo   Hobbie   Fono
Marcelo   18       masc   Pc       222222
Nicole    20       fem    Pc       333333
Andres    16       masc   Anime    666666



               Tabla completa
Nombre    Edad     Sexo   Hobbie   Fono
Marcelo   18       masc   Pc       222222
Nicole    20       fem    Pc       333333
Lily      29       fem    Anime    444444
Gerardo   19       masc   Tv       333333
Camilo    19       masc   Tv       555555
Andres    16       masc   Anime    666666
Andrea    27       fem    Leer     222222
Muestra

Nombre    Edad     Sexo   Hobbie   Fono
Nicole    20       fem    Pc       333333




               Tabla completa
Nombre    Edad     Sexo   Hobbie   Fono
Marcelo   18       masc   Pc       222222
Nicole    20       fem    Pc       333333
Lily      29       fem    Anime    444444
Gerardo   19       masc   Tv       333333
Camilo    19       masc   Tv       555555
Andres    16       masc   Anime    666666
Andrea    27       fem    Leer     222222
Muestra
Nombre    Edad     Sexo   Hobbie   Fono
Marcelo   18       masc   Pc       222222
Nicole    20       fem    Pc       333333
Lily      29       fem    Anime    444444
Andres    16       masc   Anime    666666
Andrea    27       fem    Leer     222222

               Tabla completa
Nombre    Edad     Sexo   Hobbie   Fono
Marcelo   18       masc   Pc       222222
Nicole    20       fem    Pc       333333
Lily      29       fem    Anime    444444
Gerardo   19       masc   Tv       333333
Camilo    19       masc   Tv       555555
Andres    16       masc   Anime    666666
Andrea    27       fem    Leer     222222
Muestra
Nombre    Edad     Sexo   Hobbie   Fono
Marcelo   18       masc   Pc       222222
Gerardo   19       masc   Tv       333333
Camilo    19       masc   Tv       555555
Nicole    20       fem    Pc       333333

               Tabla completa
Nombre    Edad     Sexo   Hobbie   Fono
Marcelo   18       masc   Pc       222222
Nicole    20       fem    Pc       333333
Lily      29       fem    Anime    444444
Gerardo   19       masc   Tv       333333
Camilo    19       masc   Tv       555555
Andres    16       masc   Anime    666666
Andrea    27       fem    Leer     222222
Actualiza

Nombre    Edad    Sexo   Hobbie   Fono
Marcelo   19      masc   musica   222222
Nicole    20      fem    Pc       333333
Lily      29      fem    Anime    444444
Gerardo   19      masc   Tv       333333
Camilo    19      masc   Tv       555555
Andres    16      masc   Anime    666666
Andrea    27      fem    Leer     222222
Actualiza

Nombre    Edad    Sexo   Hobbie      Fono
Marcelo   19      masc   musica      222222
Nicole    20      fem    Pc          333333
Lily      29      fem    Anime       444444
Gerardo   21      masc   Peliculas   333333
Camilo    19      masc   Tv          555555
Andres    16      masc   Anime       666666
Andrea    27      fem    Leer        222222

Más contenido relacionado

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Base de datos

  • 1. ADVERTENCIA El siguiente contenido muestra como eliminar para siempre la información en la Base de Datos. ACEPTAR;
  • 2. UNIVERSIDAD CATOLICA DE TEMUCO FACULTAD DE INGENIERIA EQUIPO “BLUEJEANS” • Lidia Bachsmann Riquelme • Nicole Rodríguez Rodríguez • Marcelo Carrasco • Gerardo Sepúlveda CARRERA: Ing. Civil en Informática
  • 3. ¿Y si escribo… ... mysql> DELETE FROM Amigos; ?
  • 5. * OR FROM NOT BETWEEN AND LIKE
  • 6. Select * from <tabla> WHERE <campo1> LIKE “atributo1” OR <campo2> LIKE “atributo2”; Select * from amigos WHERE hobbie LIKE “Pc” OR edad LIKE “16”; Select * from <tabla> WHERE <campo1> LIKE “atributo1” AND <campo2> LIKE “atributo2”; Select * from amigos WHERE hobbie LIKE “Pc” AND edad LIKE “20”; Por cada sentencia “Select”, un “Delete”
  • 7. Select * from <tabla> WHERE <campo> NOT LIKE “atributo”; Select * from amigos WHERE hobbie NOT LIKE “Tv”; DELETE FROM <TABLE> WHERE <CONDITION> Select * from <tabla> WHERE <campo> BETWEEN “atributo1” AND “atributo2”; Select * from amigos WHERE edad BETWEEN “18” AND “20”; Por cada sentencia “Select”, un “Delete” BART
  • 8. UPDATE <tabla> SET <campo> = “nuevo atributo” WHERE <campo> = “atributo”; UPDATE amigos SET hobbie=“musica” WHERE nombre = “Marcelo”; UPDATE <tabla> SET <campo> =“N.atributo”, <campo>=“N.atributo “ WHERE <campo> = “atributo”; UPDATE amigos SET hobbie=“peliculas”, edad=“21” WHERE nombre = “Gerardo”; UPDATE: especifica Registro BART
  • 9. Select Update
  • 10. Para que no pierdan los eventos ¡Qué más importantes de la vida, horror! actualizar: ¡¡Papá!! mysql> UPDATE <TABLA> SET <ATRIBUTO> WHERE <CONDICION>; “Para usar su tarjeta, actualice sus datos”
  • 11. No olviden que: 1. El uso de “Delete y Update” requiere de mucha responsabilidad. 2. Los Comandos Complementarios ayudan a especificar lo que queremos borrar. 3. La fórmula perfecta para aprender: “Ensayo y error” 4. Es momento para el juego “Preguntas y respuestas”, jeje.
  • 12.
  • 13. Muestra Nombre Edad Sexo Hobbie Fono Marcelo 18 masc Pc 222222 Nicole 20 fem Pc 333333 Andres 16 masc Anime 666666 Tabla completa Nombre Edad Sexo Hobbie Fono Marcelo 18 masc Pc 222222 Nicole 20 fem Pc 333333 Lily 29 fem Anime 444444 Gerardo 19 masc Tv 333333 Camilo 19 masc Tv 555555 Andres 16 masc Anime 666666 Andrea 27 fem Leer 222222
  • 14. Muestra Nombre Edad Sexo Hobbie Fono Nicole 20 fem Pc 333333 Tabla completa Nombre Edad Sexo Hobbie Fono Marcelo 18 masc Pc 222222 Nicole 20 fem Pc 333333 Lily 29 fem Anime 444444 Gerardo 19 masc Tv 333333 Camilo 19 masc Tv 555555 Andres 16 masc Anime 666666 Andrea 27 fem Leer 222222
  • 15. Muestra Nombre Edad Sexo Hobbie Fono Marcelo 18 masc Pc 222222 Nicole 20 fem Pc 333333 Lily 29 fem Anime 444444 Andres 16 masc Anime 666666 Andrea 27 fem Leer 222222 Tabla completa Nombre Edad Sexo Hobbie Fono Marcelo 18 masc Pc 222222 Nicole 20 fem Pc 333333 Lily 29 fem Anime 444444 Gerardo 19 masc Tv 333333 Camilo 19 masc Tv 555555 Andres 16 masc Anime 666666 Andrea 27 fem Leer 222222
  • 16. Muestra Nombre Edad Sexo Hobbie Fono Marcelo 18 masc Pc 222222 Gerardo 19 masc Tv 333333 Camilo 19 masc Tv 555555 Nicole 20 fem Pc 333333 Tabla completa Nombre Edad Sexo Hobbie Fono Marcelo 18 masc Pc 222222 Nicole 20 fem Pc 333333 Lily 29 fem Anime 444444 Gerardo 19 masc Tv 333333 Camilo 19 masc Tv 555555 Andres 16 masc Anime 666666 Andrea 27 fem Leer 222222
  • 17. Actualiza Nombre Edad Sexo Hobbie Fono Marcelo 19 masc musica 222222 Nicole 20 fem Pc 333333 Lily 29 fem Anime 444444 Gerardo 19 masc Tv 333333 Camilo 19 masc Tv 555555 Andres 16 masc Anime 666666 Andrea 27 fem Leer 222222
  • 18. Actualiza Nombre Edad Sexo Hobbie Fono Marcelo 19 masc musica 222222 Nicole 20 fem Pc 333333 Lily 29 fem Anime 444444 Gerardo 21 masc Peliculas 333333 Camilo 19 masc Tv 555555 Andres 16 masc Anime 666666 Andrea 27 fem Leer 222222