Ver Mensaje Individual
  #15 (permalink)  
Antiguo 29/04/2011, 10:22
Avatar de RIVERMILLOS
RIVERMILLOS
 
Fecha de Ingreso: marzo-2010
Mensajes: 1.336
Antigüedad: 14 años, 2 meses
Puntos: 15
Respuesta: Duda con truncate.

esta es una


Código MySQL:
Ver original
  1. CREATE  TABLE IF NOT EXISTS `ortegayb_btc`.`reglaspropiedades` (
  2.   `idreglas` INT NOT NULL AUTO_INCREMENT ,
  3.   `mensaje` LONGTEXT NOT NULL ,
  4.   `imagen` MEDIUMTEXT NULL ,
  5.   `valor` VARCHAR(100) NULL ,
  6.   `idtitulo` INT NOT NULL ,
  7.   `idaccionesreglas` INT NOT NULL ,
  8.   PRIMARY KEY (`idreglas`) ,
  9.   INDEX `idtitulo_fk_reglaspropiedades` (`idtitulo` ASC) ,
  10.   INDEX `idaccionesreglas_fk_reglaspropiedades` (`idaccionesreglas` ASC) ,
  11.   CONSTRAINT `idtitulo_fk_reglaspropiedades`
  12.     FOREIGN KEY (`idtitulo` )
  13.     REFERENCES `ortegayb_btc`.`titulos` (`idtitulos` )
  14.   CONSTRAINT `idaccionesreglas_fk_reglaspropiedades`
  15.     FOREIGN KEY (`idaccionesreglas` )
  16.     REFERENCES `ortegayb_btc`.`accionesreglas` (`idaccionesreglas` )
  17.  
  18.  
  19.  
  20.  
  21.  
  22. CREATE  TABLE IF NOT EXISTS `ortegayb_btc`.`preguntas` (
  23.   `idpreguntas` INT NOT NULL AUTO_INCREMENT ,
  24.   `idreglas` INT NOT NULL ,
  25.   `clase` VARCHAR(45) NOT NULL ,
  26.   `metodo` VARCHAR(45) NOT NULL ,
  27.   `valor` VARCHAR(100) NOT NULL ,
  28.   PRIMARY KEY (`idpreguntas`) ,
  29.   INDEX `idreglas_preguntas2op` (`idreglas` ASC) ,
  30.   CONSTRAINT `idreglas_preguntas2op`
  31.     FOREIGN KEY (`idreglas` )
  32.     REFERENCES `ortegayb_btc`.`reglaspropiedades` (`idreglas` )
  33.  
  34.  
  35. CREATE  TABLE IF NOT EXISTS `ortegayb_btc`.`reglasxpropiedades` (
  36.   `idreglasXpropiedades` INT NOT NULL AUTO_INCREMENT ,
  37.   `idreglas` INT NOT NULL ,
  38.   `idpropiedad` INT(100) NOT NULL ,
  39.   PRIMARY KEY (`idreglasXpropiedades`) ,
  40.   INDEX `idreglas_fk_reglasxpropiedades` (`idreglas` ASC) ,
  41.   INDEX `idpropiedades_fk_reglasxpropiedades` (`idpropiedad` ASC) ,
  42.   CONSTRAINT `idreglas_fk_reglasxpropiedades`
  43.     FOREIGN KEY (`idreglas` )
  44.     REFERENCES `ortegayb_btc`.`reglaspropiedades` (`idreglas` )
  45.   CONSTRAINT `idpropiedades_fk_reglasxpropiedades`
  46.     FOREIGN KEY (`idpropiedad` )
  47.     REFERENCES `ortegayb_btc`.`propiedades` (`idpropiedad` )



saludos