Top Banner

Click here to load reader

Curso SQL Practico

Jun 23, 2015

ReportDownload

Documents

aldo-ah

CURSO SQL PRACTICO

Wintell Nov 2008

Curso SQL Practico

ITConsulting

Tel: 777-318-6493 Londres #109-A. Fracc. Prados de Cuernavaca

CURSO SQL PRACTICO1.-Tipos de datos............................................................................................................. 5 Tipos Numricos............................................................................................................. 5 Tipos de Fecha y Hora. ................................................................................................... 5 Tipos Carcter. ............................................................................................................... 6 2.- Aadir registros nuevos. ............................................................................................ 7 Insercin simple.............................................................................................................. 7 Insercion de multiples tablas ........................................................................................... 7 3.- Borrado de Registros. ................................................................................................ 8 Eliminacin Simple......................................................................................................... 8 Eliminacin de mltiples tablas....................................................................................... 8 4.- Actualizacin de Registros......................................................................................... 9 Actualizacin Simple ...................................................................................................... 9 Actualizacin en base a mltiples tablas.......................................................................... 9 5.- Seleccin de registros ...............................................................................................10 Tabla comparativa de parmetros que agilizan la velocidad de seleccin........................10 Parmetros de agilizacin de conexiones........................................................................10 Connection TimeOut......................................................................................................10 Interactive Timeout........................................................................................................10 Read, Write y Wait Timeout ..........................................................................................10 Max Package Size..........................................................................................................11 Caching of hostnames ....................................................................................................11 Name Resolving ............................................................................................................11 SELECT ........................................................................................................................11 ALL...............................................................................................................................11 DISTINCT.....................................................................................................................11 DISTINCTROW............................................................................................................11 [HIGHPRIORITY] ........................................................................................................12 [STRAIGHT JOIN] .......................................................................................................12 select_expr.....................................................................................................................12 FROM ...........................................................................................................................12 WHERE ........................................................................................................................12 [GROUP BY] ................................................................................................................12 [ORDER BY] ................................................................................................................12 Ejemplos Prcticos.........................................................................................................12 Seleccin Simple ...........................................................................................................12 Seleccin de mltiples tablas .........................................................................................12 Seleccin de datos resultados de operaciones. ................................................................12 6.- Funciones SQL .........................................................................................................13 Funciones para clculos de resmenes o datos estadsticos.............................................13 Count.............................................................................................................................13 Greatest. ........................................................................................................................13 Least..............................................................................................................................13 Max. ..............................................................................................................................13 Min................................................................................................................................13 Sum. ..............................................................................................................................13ITConsulting Pagina 2 de 39

Wintell Nov 2008

Indice

CURSO SQL PRACTICOAvg................................................................................................................................13 Funciones para expresiones de seleccin con fechas.......................................................13 Addates..........................................................................................................................13 Addtime.........................................................................................................................13 current_date...................................................................................................................13 current_time...................................................................................................................13 date_add ........................................................................................................................14 date_sub.........................................................................................................................14 Date...............................................................................................................................14 Datediff .........................................................................................................................14 Day................................................................................................................................14 Month. ...........................................................................................................................14 Year...............................................................................................................................14 Dayname. ......................................................................................................................14 Dayofweek. ...................................................................................................................14 Dayofyear. .....................................................................................................................14 Extract. ..........................................................................................................................14 Hour. .............................................................................................................................14 Minute. ..........................................................................................................................14 Second...........................................................................................................................14 Now...............................................................................................................................14 Monthname....................................................................................................................14 str_to_date. ....................................................................................................................14 Timediff.........................................................................................................................14 Funciones de uso general. ..............................................................................................15 Upper.............................................................................................................................15 Lower. ...........................................................................................................................15 Substr. ...........................................................................................................................15 Substrindex....................................................................................................................15 Concat. ..........................................................................................................................15 Trim...............................................................................................................................15 Ltrim. ...........................................

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.