Sei sulla pagina 1di 8

MANUAL DE SQL

Tarea para el 16 de nov del 1 al 10


INSTRUCCI
N

DESCRIPCIN

create data
base

Crea una nueva


base de datos

Show data
bases

Muestra la bases
de datos

New table

Nueva tabla

Create new
table

Crea una nueva


tabla

Imports
system
Create proc

Importar sistema

Imports
system data
sql cliente
Select by
order desc

Crear
procedimiento
Importa el sistema
de base sql cliente

show

Selecciona y
ordena
descendiente
mostrar

Show table

Muestra la tabla

Show drop
table

Muestra toda la
tabla de campos

Field Type

drop table if
exists
Insert intoselect
select

Selecciona e
inserta enteros
Selecciona

From

De

SINTAXIS

Varchar

Primary key

Se usa para
almacenar cadenas
de caracteres (225)
Se usa para
guardar valores
numricos enteros
Se usa para
almacenar valores
numricos
decimales
Llave primaria

Insert into

Inserta enteros

values

valores

Autoincrement
Int auto
increment
Trncate table

Autoincremento

Integer

Float

delete

Auto incremento de
enteros
Eliminar todos los
registros de una
tabla
borrar

Drop table

Borra toda la tabla

field

default

Indica el tipo de
dato de cada
campo
Dato desconocido o
valor inexistente
defecto

Where

Donde

Select from

Selecciona de

unsigned

Sin signo

Integer
unsigned
Mdium-Int

Integre solo valores


positivos

Null

Small-Int

Permite solo valores


positivos

Tiny Int
bool

boleano

Big-Int

Es un entero largo

date

Fecha

data time
time

Almacena fecha y
hora
Tiempo

year

Ao

Time stamp
Blob
Text

texto

Zerofil

Rellena con ceros


los espacios
disponibles a la
izquierda
Selecciona y
ordena

Select order
Ord
concat

Concatenar

Ws

With separador

Find-in-set
Select lengt

Selecciona la
longitud

Select locale
Select
position
Select instr
Select ipad

Selecciona la
posicin
Selecciona la
instruccin

Select left
Select right
Select
substring
Select mid

Selecciona la
izquierda
Selecciona la
derecha
Selecciona la
cadena

Select
substringindex
Select itrim
Select rtrim
Leading
Trailing
Trim
both

ambos

replace

remplaza

return

retorna

repeat

Repetir

Reverse

devolver

Select replace

Selecciona
reemplaza
Selecciona
retorna
Selecciona
devuelve
Selecciona

Select return
Select reverse
Select repeat
Select Insert
Select lower
Select i case

y
y
y
y repite

Selecciona e
inserta

Select upper
Select ucase
Select strcmp
Select abs
Select ceiling
Select mod
Select floor

Selecciona abajo

Lower
Case
Upper
Ucase
Strcmp
Greatest
Least
Mod
power

encender

Rand
Round
Select power
Select round
Select
trncate
adddate

Fecha agregndole
el intervalo
especificado

addtime

Tiempo
agregndole el
intervalo
especificado

Current_date
Current_time
Date_add
Month

mes

Interval

intervalo

Day

da

Date_sub
Minute_secon
d
Minute_hour

Minutos y
segundos
Minutos y horas

Day_hour

Da y horas

Day_minute

Da y minutos

Year_month

Ao y mes

Day_second

Das y segundos

Date dif
dayname

Retorna el nombre
del da de la
semana

Thursday
Day of Month
Day of week
Day of year
Extract

Retorna da del
mes
Retorna el da de la
semana
Retorna el da del
ao

Month name
mow
Period_andd

Retorna el nombre
del mes
nuevo

Order by

Agrega n meses al
periodo
Retorna el nmero
de meses entre los
periodos
Retorna los
segundos para la
hora dada
Retorna el
argumento
segundos
convertido a horas,
minutos y
segundos
Retorna la cantidad
de horas, minutos
y segundos
Retorna el
argumento hora
convertido en
segundos
Retorna el nmero
de das desde el
ao cero
Retorna el ndice
del da de la
semana para la
fecha pasada como
argumento
Retorna el ao de
la fecha dada
Ordena el resultado

andd

or

y/o

xor

not

No, invierte el
resultado

Period_dif

Second(hora)

Sec_to_time(s
egundos)

Time dif

Time_to_sec(h
ora)

To_days(fecha
)
Weekday(fech
a)

Year(fecha)

Between-in
Is Null

Es nulo

Is not Null

No es nulo

Potrebbero piacerti anche