Er Password
Er Password
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Database changed
mysql> create table cliente( cedula varchar(10) not null, nombre varchar(200) not null, email
varchar(100) not null unique, telefono varchar(12), primary key (cedula) );
+----------+--------------+------+-----+---------+-------+
+----------+--------------+------+-----+---------+-------+
+----------+--------------+------+-----+---------+-------+
mysql> create table prestamo( codigo_prestamo int not null auto_increment, fecha_prestamo
date not null, fecha_devolucion date not null, cedula_cliente varchar(10) not null, primary key
(codigo_prestamo), foreign key (cedula_cliente) references cliente (cedula) );
+------------------+-------------+------+-----+---------+----------------+
+------------------+-------------+------+-----+---------+----------------+
+------------------+-------------+------+-----+---------+----------------+
mysql> insert into cliente(cedula, nombre, email) values ("124", "Juanita", "juana@mail.com");
+----------+--------------+------+-----+---------+-------+
+----------+--------------+------+-----+---------+-------+
+--------+---------+----------------+----------+
+--------+---------+----------------+----------+
+--------+---------+----------------+----------+
->
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 'select * from cliente join prestamo
where c.cedula= "007"' at line 3
mysql> insert into prestamo(fecha_prestamo, fecha_devolucion, cedula_cliente) values
("2021/02/10", "2021/02/25", "123");
mysql>
mysql>
mysql>
mysql>
+-----------------+----------------+------------------+----------------+
+-----------------+----------------+------------------+----------------+
+-----------------+----------------+------------------+----------------+
+--------+---------+------------------+----------+-----------------+----------------+------------------+----------------+
| cedula | nombre | email | telefono | codigo_prestamo | fecha_prestamo |
fecha_devolucion | cedula_cliente |
+--------+---------+------------------+----------+-----------------+----------------+------------------+----------------+
+--------+---------+------------------+----------+-----------------+----------------+------------------+----------------+
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 'select * from cliente' at line 2
mysql> select * from cliente;
+--------+---------+------------------+----------+
+--------+---------+------------------+----------+
+--------+---------+------------------+----------+
mysql>
mysql> ^E^E