Want to create interactive content? It’s easy in Genially!

Get started free

FUNCIONES SQL

Zaid Gonzalez

Created on March 14, 2024

EQUIPO 1

Start designing with a free template

Discover more than 1500 professional designs like these:

Corporate Christmas Presentation

Snow Presentation

Nature Presentation

Halloween Presentation

Tarot Presentation

Winter Presentation

Vaporwave presentation

Transcript

PRESENTATION

FUNCIONES SQL

PRESS START

-EQUIPO 1-ZAID YOHARAM GONZALEZ BAEZLUIS FERNANDO CASILLAS FLORES JUAN ISRAEL GARCIA VILLEGAS

FUNCIONES:

LENGTH()

CONCAT()

UPPER()

LOWER()

+INFO

FUNCION CONCAT()

pOR EJEMPLO:

La función CONCAT en SQL es utilizada para concatenar O unir valores de cadenas de caracteres. Es especialmente útil cuando deseas combinar el contenido de varias columnas en una sola cadena

eSTA FUNCION NOS VA A ENTREGAR UNA TABLA CON UNA NUEVA COLUMNA LLAMADA nOMBRE_COMPLETO

+INFO

EJEMPLO JOYERIA BRILLANTE

pODEMOS CONCATENAR 2 COLUMNAS Y SUMADO A ESTO PODEMOS AGREGAR "TEXTO" ENTRE CADA UNA DE ESTAS EN CASO DE NECESIATRLO

+INFO

EJEMPLO JOYERIA BRILLANTE

pODEMOS AGREGAR "CASOS" EN LA FUNCION, PARA SER MAS ESPECIFICOS A LA HORA DE QUERER CONCATENAR

cON LA AYUDA DE LEFT PODEMOS "IGNORAR" ALGUNOS CORREOS ESPECIFICOS SI EMPIEZAN CON UNA PALABRA, LETRA NUMERO ETC.

+INFO

FUNCION LENGTH()

pOR EJEMPLO:

La función LENGTH se utiliza para determinar la longitud de una cadena de texto. Esta función toma una cadena como argumento y devuelve el número de caracteres en esa cadena.

La palabra "hola" contiene 4 elementos1.- h 2.- o 3.- l 4.- a

+INFO

EJEMPLO JOYERIA BRILLANTE

QUEREMOS CONOCER QUE TAN BUENA DESCRIPCION TIENEN NUESTROS PRODUCTOS. ENTONCES EJECUTAMOS UNA FUNCION LENGTH() PARA SABER QUE PRODUCTOS ESTAN MEJOR DESCRITOS

EL RESULTADO DE NUESTRA CONSULTA

LOWER():

+La función LOWER() convierte todos los caracteres alfabéticos de una cadena de texto en minúsculas.

Esta función convierte todos los caracteres alfabéticos de una cadena de texto en minúsculas.

Es útil cuando necesitas realizar comparaciones de texto sin tener en cuenta las diferencias entre mayúsculas y minúsculas.

Puede aplicarse a cualquier tipo de dato de cadena de texto (CHAR, VARCHAR, TEXT, etc.).

UPPER():

Al igual que LOWER(), puede aplicarse a cualquier tipo de dato de cadena de texto.

Esta funcion convierte todos los caracteres alfabéticos de una cadena de texto en mayúsculas.

Es útil para realizar comparaciones de texto sin distinguir entre mayúsculas y minúsculas.

Ejemplos

SELECT LOWER(VCNOMBRE) AS Nombre_en_MinusculasFROM CLIENTE;

SELECT UPPER(VCNOMBRE) AS Nombre_en_MayusculasFROM PRODUCTO;

¿Para qué nos sirve ?

+1

Normalización de datos de entrada de usuario:

+3

Validación de entradas de datos sensibles a mayúsculas/minúsculas:

+2

Búsqueda sin distinción entre mayúsculas y minúsculas:

Practica

Usando el comando SELECT UPPER y (VCDESCRIPCION) AS Descripcion_en_Mayusculas FROM PRODUCTO;

+LOWER

PREGUNTA

¿Que resultado ARROJARA LA SIGUIENTE consulta?

rESULTADO

LA CONSULTA DA COMO RESULTADO 10 ya que dentro de la cadena se encuentran 10 elementos en total

PREGUNTA

¿Que resultado ARROJARA LA SIGUIENTE consulta?

rESULTADO

LA CONSULTA DA COMO RESULTADO UNA TABLA CON 2 COLUMNAS, CADA COLUMNA CONCATENA 2 COLUMNAS MAS

Got an idea?

Use this space to add awesome interactivity. Include text, images, videos, tables, PDFs... even interactive questions! Premium tip: Get information on how your audience interacts with your creation:

  • Visit the Analytics settings;
  • Activate user tracking;
  • Let the communication flow!

Got an idea?

Use this space to add awesome interactivity. Include text, images, videos, tables, PDFs... even interactive questions! Premium tip: Get information on how your audience interacts with your creation:

  • Visit the Analytics settings;
  • Activate user tracking;
  • Let the communication flow!

Got an idea?

Use this space to add awesome interactivity. Include text, images, videos, tables, PDFs... even interactive questions! Premium tip: Get information on how your audience interacts with your creation:

  • Visit the Analytics settings;
  • Activate user tracking;
  • Let the communication flow!