*   >> Lectura Educación Artículos >> science >> programación

Mysql create table SQL Chrys

Base de datos Implementar en MySQL - Parte 5Introduction Esto es parte de mi serie 5, implementación de base de datos en MySQL. Supongo que ha leído todas las diferentes partes de la serie (o tutoriales equivalentes de otros lugares) hasta este punto. En esta parte de la serie, nos fijamos en los puntos importantes en el MySQL CREATE TABLE. Crearemos también las tablas del ejemplo. Recuerde, usted está tratando con MySQL 5.1. Nota: Si no puede ver el código o si cree que falta algo (enlace roto, la imagen ausente), simplemente en contacto conmigo en [email protected].

Es decir, en contacto conmigo para el más mínimo problema que tenga acerca de lo que está leyendo. MySQL tiene dos tipos de tablas, que se llaman, tablas MyISAM y InnoDB. En esta serie nos ocupamos de Sintaxis Declaración TABLA tables.CREATE MyISAM SQL primera vez que te daré la sintaxis completa. Cuando usted lo lee usted probablemente no va a entender. Voy a explicar los puntos importantes a continuación.

La sintaxis comienza con: CREATE [TEMPORAL] TABLE [IF NOT EXISTS] tbl_name {COMO old_tbl_name | (COMO old_tbl_name)} create_definition: column_definition col_name | [CONSTRAINT [símbolo]] PRIMARY KEY [index_type] (index_col_name, ...) [index_option] ... | {ÍNDICE | KEY} [index_name] [index_type] (index_col_name, ...) [index_option] ... | [CONSTRAINT [símbolo]] UNIQUE [ÍNDICE | KEY] [index_name] [index_type] (index_col_name, ...) [index_option] ... | {FULLTEXT | ESPACIAL} [ÍNDICE | KEY] [index_name] (index_col_name, ...) [index_option] ...

| [CONSTRAINT [símbolo]] FOREIGN KEY [index_name] (index_col_name, ...) reference_definition | CHECK (expr) La sintaxis de la column_definition es: column_definition: data_type [NOT NULL | NULL] [default_value DEFAULT] [AUTO_INCREMENT] [UNIQUE [KEY] | [PRIMARIA] KEY] [COMENTARIO 'cadena'] [COLUMN_FORMAT {FIJO | DINÁMICO | DEFAULT}] [ALMACENAMIENTO {DISCO | MEMORIA | DEFAULT}] [reference_definition] La sintaxis para el tipo de datos es: data_type: BIT [(longitud)] | TINYINT [(longitud)] [UNSIGNED] [ZEROFILL] | SMALLINT [(longitud)] [UNSIGNED] [ZEROFILL] | MEDIUMINT [(longitud)] [UNSIGNED] [ZEROFILL] | INT [(longitud)] [UNSIGNED] [ZEROFILL] | INTEGER [(longitud)] [UNSIGNED] [ZEROFILL] | BIGINT [(longitud)] [UNSIGNED] [ZEROFILL] | Real [(longitud, decimales)] [UNSIGNED] [ZEROFILL] | DOBLE [(longitud, decimales)] [UNSIGNED] [ZEROFILL] | FLOAT [(longitud, decimales)] [UNSIGNED] [ZEROFILL] | DECIMAL [(longitud [, decimales])] [UNSIGNED] [ZEROFILL] | N

Page   <<       [1] [2] [3] [4] >>
Copyright © 2008 - 2016 Lectura Educación Artículos,https://lectura.nmjjxx.com All rights reserved.