Professional Documents
Culture Documents
TBD - Eva 1 - Practica1
TBD - Eva 1 - Practica1
The pattern is a filter to identify topics for which help is required, it can
use the following wildcards:
- Shell Commands Provides details about the available built-in shell commands.
- SQL Syntax Entry point to retrieve syntax help on SQL statements.
SHELL COMMANDS
The shell commands allow executing specific operations including updating the
shell configuration.
EXAMPLES
\? sql syntax
Displays the main SQL help categories.
\? select
Displays information about the SELECT SQL statement.
MySQL localhost:3306 ssl SQL > \sql
MySQL localhost:3306 ssl SQL > sql
-> ;
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 'sql' at
line 1
MySQL localhost:3306 ssl SQL > show tables;
ERROR: 1046 (3D000): No database selected
MySQL localhost:3306 ssl SQL > show databases
-> ;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sakila |
| sys |
| world |
+--------------------+
6 rows in set (0.0016 sec)
MySQL localhost:3306 ssl SQL > create daatabase;
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
'daatabase' at line 1
MySQL localhost:3306 ssl SQL > create daatabase hola;
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
'daatabase hola' at line 1
MySQL localhost:3306 ssl SQL > create database hola;
Query OK, 1 row affected (0.3046 sec)
MySQL localhost:3306 ssl SQL > show databases;
+--------------------+
| Database |
+--------------------+
| hola |
| information_schema |
| mysql |
| performance_schema |
| sakila |
| sys |
| world |
+--------------------+
7 rows in set (0.0013 sec)
MySQL localhost:3306 ssl SQL > select hola;
ERROR: 1054 (42S22): Unknown column 'hola' in 'field list'
MySQL localhost:3306 ssl SQL > select database hola;
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 'hola' at
line 1
MySQL localhost:3306 ssl SQL > use hola;
Default schema set to `hola`.
Fetching table and column names from `hola` for auto-completion... Press ^C to
stop.
MySQL localhost:3306 ssl hola SQL > create table;
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 '' at
line 1
MySQL localhost:3306 ssl hola SQL > show tables;
Empty set (0.0016 sec)
MySQL localhost:3306 ssl hola SQL > create table gente;
ERROR: 1113 (42000): A table must have at least 1 column
MySQL localhost:3306 ssl hola SQL > create table empleados (
-> id bigint unsigned auto_increment primary
key,
-> nombre varchar(50));
Query OK, 0 rows affected (2.9010 sec)
MySQL localhost:3306 ssl hola SQL > show tables
-> ;
+----------------+
| Tables_in_hola |
+----------------+
| empleados |
+----------------+
1 row in set (0.0244 sec)
MySQL localhost:3306 ssl hola SQL > use empleados;
MySQL Error 1049: Unknown database 'empleados'
MySQL localhost:3306 ssl hola SQL > show table empleados;
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
'empleados' at line 1
MySQL localhost:3306 ssl hola SQL > show tables empleados;
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
'empleados' at line 1
MySQL localhost:3306 ssl hola SQL > use table empleados
Incorrect number of arguments for use command, usage:
\use <schema_name>
MySQL localhost:3306 ssl hola SQL > use table empleados;
Incorrect number of arguments for use command, usage:
\use <schema_name>
MySQL localhost:3306 ssl hola SQL > describe empleados;
+--------+-----------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------+-----------------+------+-----+---------+----------------+
| id | bigint unsigned | NO | PRI | NULL | auto_increment |
| nombre | varchar(50) | YES | | NULL | |
+--------+-----------------+------+-----+---------+----------------+
2 rows in set (0.1393 sec)
MySQL localhost:3306 ssl hola SQL > drop table empleados;
Query OK, 0 rows affected (0.8303 sec)
MySQL localhost:3306 ssl hola SQL > show tables
-> ;
Empty set (0.0350 sec)
MySQL localhost:3306 ssl hola SQL > \disconnect
MySQL SQL >