Professional Documents
Culture Documents
Tablas
Tablas
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create table clientes (id_clientes int(8) not null auto_increment, nombre
varchar(255) not null, primary key (id_clientes)) type = innodb;
ERROR 1046 (3D000): No database selected
mysql> use relaciones;
Database changed
mysql> create table clientes (id_clientes int(8) not null auto_increment, nombre
varchar(255) not null, primary key (id_clientes)) type = innodb;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'type
= innodb' at line 1
mysql> create table clientes (id_clientes int(8) not null auto_increment, nombre
varchar(255) not null, primary key (id_clientes)) type=innodb;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'type=
innodb' at line 1
mysql> create table clientes (id_clientes int(8) not null auto_increment, nombre
varchar(255) not null, primary key (id_clientes));
Query OK, 0 rows affected (0.07 sec)
mysql>
mysql> insert into privilegios values(5 ,6,20);
ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint f
ails (`relaciones`.`privilegios`, CONSTRAINT `privilegios_ibfk_1` FOREIGN KEY (`
id_cliente`) REFERENCES `clientes` (`id_clientes`))
mysql> insert into clientes values(5, "Yael Gutierrez");
Query OK, 1 row affected (0.04 sec)