

RESTRICCIONES SQL
Presentation
•
Computers
•
11th Grade
•
Hard
santiago hernandez
Used 5+ times
FREE Resource
11 Slides • 11 Questions
1
RESTRICCIONES Y REPASO DE MySql

2
SEGUIMOS DENTRO DE DDL
LENGUAJE DE DEFINICIÓN DE DATOS
3
UNA RESTRICCIÓN SQL ES UNA CONDICIÓN QUE SE DEBE CUMPLIR
Es útil agregar todas las restricciones necesarias para evitar problemas con el ingreso de datos
4
OBSERVEMOS LA TABLA CLIENTES
CREATE TABLE CLIENTES (
Cedula INT PRIMARY KEY,
Nombre VARCHAR (30) NOT NULL,
Direccion VARCHAR (30) NOT NULL,
Telefono INT);
5
TELEFONO es de tipo INT, lo cual está bien, pero este campo admite cualquier entero cómo válido, y eso no es así en realidad
6
CHECK
La restricción CHECK, comprueba según condición o condiciones los datos a ingresar a cada registro donde se establezca.
7
Telefono INT CHECK (Telefono > 0)
esta comprobación evita que se ingresen números negativos
8
CHECK (Telefono LIKE 09)
Esta comprobación indica que el teléfono debe comenzar con 0 y seguido de un 9, podría ser útil para los celulares
9
TAMBIÉN NOS PUEDE INTERESAR QUE UN DATO NO SE REPITA, ES DECIR QUE NO PUEDA EXISTIR OTRO REGISTRO CON EL MISMO VALOR PARA ESA COLUMNA
UNIQUE
10
Nombre VARCHAR (50) UNIQUE,
EN ESTE CASO NO PODRÁN HABER DOS NOMBRES IGUALES.
11
Fill in the Blanks
RESTRINGIR QUE NO EXISTAN LIBROS CON PRECIO MENOR A 100 PESOS
Type answer...
12
Multiple Select
Cantidad de libro debe estar entre 0 y 20
Cantidad INT CHECK (Cantidad >= 0 AND Cantidad <= 20) ,
Cantidad INT CHECK (Cantidad > 0 AND Cantidad < 20) ,
Cantidad INT CHECK (Cantidad <= AND Cantidad <= 20) ,
Cantidad INT CHECK (Cantidad >= 0 AND Cantidad >= 20) ,
13
Fill in the Blanks
TELÉFONO DEBE COMENZAR CON 433
Type answer...
14
Fill in the Blanks
DIRECCIÓN DEBE COMENZAR CON LA PALABRA (Calle)
Type answer...
15
BETWEEN = entre
Se usa para determinar un intervalo de valores
16
Multiple Choice
LOS LIBROS DEBEN VALER ENTRE 100 Y 4500 PESOS
Precio FLOAT CHECK (BETWEEN 100 AND 4500),
Precio FLOAT (Precio BETWEEN 100 AND 4500),
Precio FLOAT CHECK (Precio BETWEEN 100 AND 4500),
17
Multiple Choice
Las sentencias de restricciones pertenecen a:
DDL
DML
PROCEDURE
Otras
18
Multiple Select
UNA RESTRICCIÓN ES SINÓNIMO DE:
Una recomendación
Una condición
Un tipo de dato
Una regla sobre los registros
19
Fill in the Blanks
Restricción de que no puede quedar el campo en blanco
Type answer...
20
Fill in the Blanks
Restricción de clave primaria
Type answer...
21
Fill in the Blanks
RESTRICCIÓN DE QUE EL VALOR PARA ESE CAMPO NO SE PUEDE REPETIR
Type answer...
22
Fill in the Blanks
SENTENCIA PARA CAMBIAR EL NOMBRE DE UNA TABLA
Type answer...
RESTRICCIONES Y REPASO DE MySql

Show answer
Auto Play
Slide 1 / 22
SLIDE
Similar Resources on Wayground
13 questions
ENGLISH SPM PRACTICE
Presentation
•
11th Grade
15 questions
Factoring the GCF
Presentation
•
10th Grade
17 questions
Social Media
Presentation
•
9th - 12th Grade
21 questions
Cableado Estructurado
Presentation
•
11th Grade
17 questions
SEMANA 8 - PRIMERO TECNICO
Presentation
•
10th Grade
18 questions
Online Essentials - Revision Lesson 2
Presentation
•
11th Grade
17 questions
2. Struktur Data C dan Compiler
Presentation
•
11th Grade
17 questions
Stoichiometry
Presentation
•
11th Grade
Popular Resources on Wayground
10 questions
Safety Day 2026 – Student Review
Quiz
•
9th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
12 questions
Map Skills
Quiz
•
3rd Grade
22 questions
Continents and Oceans
Quiz
•
5th Grade
15 questions
Rounding Decimals
Quiz
•
5th Grade