Does copied code from workbench not work for me on phpmyadmin?

0

I made a database in workbench and copied it:

SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';

-- -----------------------------------------------------
-- Schema cliente_factura
-- -----------------------------------------------------

-- -----------------------------------------------------
-- Schema cliente_factura
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS 'cliente_factura' DEFAULT CHARACTER SET utf8 ;
USE 'cliente_factura' ;

-- -----------------------------------------------------
-- Table 'cliente_factura'.'table1'
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS 'cliente_factura'.'table1' (
)


-- -----------------------------------------------------
-- Table 'cliente_factura'.'table2'
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS 'cliente_factura'.'table2' (
)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table 'cliente_factura'.'cliente'
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS 'cliente_factura'.'cliente' (
  'IdCliente' INT NOT NULL AUTO_INCREMENT,
  'Nombre' VARCHAR(50) NOT NULL,
  'Apellido' VARCHAR(50) NOT NULL,
  'Direccion' VARCHAR(50) NOT NULL,
  'Telefono' VARCHAR(50) NOT NULL,
  'clientecol' VARCHAR(50) NOT NULL,
  PRIMARY KEY ('IdCliente'))
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table 'cliente_factura'.'factura'
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS 'cliente_factura'.'factura' (
  'IdFactura' INT NOT NULL AUTO_INCREMENT,
  'Fecha' DATETIME NULL,
  'Tipo' CHAR NULL,
  'Importe' FLOAT NULL,
  PRIMARY KEY ('IdFactura'))
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table 'cliente_factura'.'cliente_factura'
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS 'cliente_factura'.'cliente_factura' (
  'IdCliente' INT NOT NULL,
  'IdFactura' INT NOT NULL,
  INDEX 'IdCliente_idx' ('IdCliente' ASC),
  INDEX 'IdFactura_idx' ('IdFactura' ASC),
  CONSTRAINT 'IdCliente'
    FOREIGN KEY ('IdCliente')
    REFERENCES 'cliente_factura'.'cliente' ('IdCliente')
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT 'IdFactura'
    FOREIGN KEY ('IdFactura')
    REFERENCES 'cliente_factura'.'factura' ('IdFactura')
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB;

USE 'cliente_factura' ;

-- -----------------------------------------------------
-- Placeholder table for view 'cliente_factura'.'view1'
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS 'cliente_factura'.'view1' ('id' INT);

-- -----------------------------------------------------
-- View 'cliente_factura'.'view1'
-- -----------------------------------------------------
DROP TABLE IF EXISTS 'cliente_factura'.'view1';
USE 'cliente_factura';


SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;

That would create the database in perfect conditions, but not the tables and their corresponding fields and I get this error:

  

Error   Static analysis:

     

2 errors were found during the analysis.

     

A symbol name was expected! (near ")" at position 210)   The definition of at least one column was expected. (near ")" at position 210)   SQL query:

     

- --------------------------------------------- -------- - Table cliente_factura . table1 - ------------------------------ ----------------------- CREATE TABLE IF NOT EXISTS cliente_factura . table1 () ENGINE = InnoDB

     

MySQL has said: Documentation

     

1064 - Something is wrong in its near syntax ')

     

ENGINE = InnoDB 'on line 5

I would like to know in which part of the code there is an error Thank you very much

    
asked by Santi Corso 15.10.2017 в 21:12
source

0 answers