MariaDB [(none)]> source C:\Users\A01-1-0502-15\Downloads\matricula.sql3 ERROR: Failed to open file 'C:\Users\A01-1-0502-15\Downloads\matricula.sql3', error: 2 MariaDB [(none)]> source C:\Users\A01-1-0502-15\Downloads\matricula.sql Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 1 row affected (0.00 sec) Database changed Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.20 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 5 rows affected (0.04 sec) Records: 5 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.08 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.23 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 5 rows affected (0.05 sec) Records: 5 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.10 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.23 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 2 rows affected (0.05 sec) Records: 2 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.09 sec) MariaDB [matricula]> user -> ; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'user' at line 1 MariaDB [matricula]> show tables; +---------------------+ | Tables_in_matricula | +---------------------+ | alumno | | alumno_materia | | materia | +---------------------+ 3 rows in set (0.00 sec) MariaDB [matricula]> describe alumno; +--------+----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------+----------+------+-----+---------+-------+ | carnet | char(10) | NO | PRI | NULL | | | nombre | char(40) | NO | | NULL | | | estado | char(10) | NO | | NULL | | +--------+----------+------+-----+---------+-------+ 3 rows in set (0.00 sec) MariaDB [matricula]> describe alumno_materia; +--------+----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------+----------+------+-----+---------+-------+ | carnet | char(10) | NO | MUL | NULL | | | codigo | char(10) | NO | MUL | NULL | | +--------+----------+------+-----+---------+-------+ 2 rows in set (0.00 sec) MariaDB [matricula]> describe materia; +--------+----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------+----------+------+-----+---------+-------+ | codigo | char(10) | NO | PRI | NULL | | | nombre | char(40) | NO | | NULL | | | estado | char(10) | NO | | NULL | | +--------+----------+------+-----+---------+-------+ 3 rows in set (0.00 sec) MariaDB [matricula]> select * from alumno; +-----------+-----------------------+----------+ | carnet | nombre | estado | +-----------+-----------------------+----------+ | 1000 | gloria | activo | | 112121545 | kelly ruiz | inactivo | | 2000 | jose miguel jaramillo | activo | | 3000 | luna | activo | | dsfds | sdfsdf | Activo | +-----------+-----------------------+----------+ 5 rows in set (0.00 sec) MariaDB [matricula]> select * from alumno_materia; +--------+--------+ | carnet | codigo | +--------+--------+ | 1000 | 100 | | 1000 | 200 | | 2000 | 200 | | 3000 | 200 | | 3000 | 100 | +--------+--------+ 5 rows in set (0.00 sec) MariaDB [matricula]> select * from materia; +--------+-------------+--------+ | codigo | nombre | estado | +--------+-------------+--------+ | 100 | matematicas | | | 200 | humanidades | | +--------+-------------+--------+ 2 rows in set (0.00 sec) MariaDB [matricula]> insert into alumno(carnet,nombre,estado)values('1146436052','Andrey Caro','Activo'); Query OK, 1 row affected (0.04 sec) MariaDB [matricula]> select * from alumno; +------------+-----------------------+----------+ | carnet | nombre | estado | +------------+-----------------------+----------+ | 1000 | gloria | activo | | 112121545 | kelly ruiz | inactivo | | 1146436052 | Andrey Caro | Activo | | 2000 | jose miguel jaramillo | activo | | 3000 | luna | activo | | dsfds | sdfsdf | Activo | +------------+-----------------------+----------+ 6 rows in set (0.00 sec) MariaDB [matricula]> delimiter // MariaDB [matricula]> create procedure insertar_alumno(in _carnet char(10), in _nombre char(40), in _estado char(10)) -> begin -> insert into alumno(carnet,nombre,estado) values(_carnet,_nombre,_estado); -> end -> // Query OK, 0 rows affected (0.04 sec) MariaDB [matricula]> delimiter ; MariaDB [matricula]> show procedure status; +-----------+-----------------+-----------+----------------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+ | Db | Name | Type | Definer | Modified | Created | Security_type | Comment | character_set_client | collation_connection | Database Collation | +-----------+-----------------+-----------+----------------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+ | matricula | insertar_alumno | PROCEDURE | root@localhost | 2019-05-16 01:25:10 | 2019-05-16 01:25:10 | DEFINER | | utf8 | utf8_general_ci | latin1_swedish_ci | +-----------+-----------------+-----------+----------------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+ 1 row in set (0.00 sec) MariaDB [matricula]> show create procedure insertar_alumno; +-----------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+--------------------+ | Procedure | sql_mode | Create Procedure | character_set_client | collation_connection | Database Collation | +-----------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+--------------------+ | insertar_alumno | NO_AUTO_VALUE_ON_ZERO | CREATE DEFINER=`root`@`localhost` PROCEDURE `insertar_alumno`(in _carnet char(10), in _nombre char(40), in _estado char(10)) begin insert into alumno(carnet,nombre,estado) values(_carnet,_nombre,_estado); end | utf8 | utf8_general_ci | latin1_swedish_ci | +-----------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+--------------------+ 1 row in set (0.00 sec) MariaDB [matricula]> call insertar_alummno('21406452','Isaac Valencia','Activo'); ERROR 1305 (42000): PROCEDURE matricula.insertar_alummno does not exist MariaDB [matricula]> call insertar_alumno('21406452','Isaac Valencia','Activo'); Query OK, 1 row affected (0.03 sec) MariaDB [matricula]> select * from alumno; +------------+-----------------------+----------+ | carnet | nombre | estado | +------------+-----------------------+----------+ | 1000 | gloria | activo | | 112121545 | kelly ruiz | inactivo | | 1146436052 | Andrey Caro | Activo | | 2000 | jose miguel jaramillo | activo | | 21406452 | Isaac Valencia | Activo | | 3000 | luna | activo | | dsfds | sdfsdf | Activo | +------------+-----------------------+----------+ 7 rows in set (0.00 sec) MariaDB [matricula]> call insertar_alumno('32636595','Paula Caro','Inactivo'); Query OK, 1 row affected (0.03 sec) MariaDB [matricula]> select * from alumno; +------------+-----------------------+----------+ | carnet | nombre | estado | +------------+-----------------------+----------+ | 1000 | gloria | activo | | 112121545 | kelly ruiz | inactivo | | 1146436052 | Andrey Caro | Activo | | 2000 | jose miguel jaramillo | activo | | 21406452 | Isaac Valencia | Activo | | 3000 | luna | activo | | 32636595 | Paula Caro | Inactivo | | dsfds | sdfsdf | Activo | +------------+-----------------------+----------+ 8 rows in set (0.00 sec) MariaDB [matricula]> Drop procedure insertar_alumno; Query OK, 0 rows affected (0.04 sec) MariaDB [matricula]> show procedure status; Empty set (0.02 sec) MariaDB [matricula]> delimiter // MariaDB [matricula]> create procedure insertar_alumno(in _carnet char(10), in _nombre char(40), in _estado char(10)) -> begin -> insert into alumno(carnet,nombre,estado) values(_carnet,_nombre,_estado); -> end -> // Query OK, 0 rows affected (0.04 sec) MariaDB [matricula]> delimiter ; MariaDB [matricula]> show procedure status; +-----------+-----------------+-----------+----------------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+ | Db | Name | Type | Definer | Modified | Created | Security_type | Comment | character_set_client | collation_connection | Database Collation | +-----------+-----------------+-----------+----------------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+ | matricula | insertar_alumno | PROCEDURE | root@localhost | 2019-05-16 01:46:51 | 2019-05-16 01:46:51 | DEFINER | | utf8 | utf8_general_ci | latin1_swedish_ci | +-----------+-----------------+-----------+----------------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+ 1 row in set (0.00 sec) MariaDB [matricula]> exit