mysql> create database hola;
Query OK, 1 row affected (0.00 sec)
mysql> use hola;
Database changed
mysql> create table emple(emple_no integer primary
key,apellido varchar(10),ofic
io varchar(10),dir integer,fecha_alt date,salario
integer,comision varchar(10),dept_no integer);
Query OK, 0 rows affected (0.03 sec)
mysql> insert into
emplevalues(7369,'sanchez','empleado', 7902, 1990/12/17 , 1040,'null',20);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into emple values (7499 ,'arroyo'
,'vendedor', 7698,
1990/02/20,1500,'390',30);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into emple
values(7521,'sala','vendedor',7339,1991/02/22,1625,'650',30);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into emple values(7556,'JIMENEZ','DIRECTOR',7698,1991/04/02,2900,'NULL',20);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into emple
values(7654,'MARTIN','VENDEDOR',7839,1991/09/29,1600,'1020',30);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into emple
values(7698,'NEGRO','DIRECTOR',7698,1991/05/01,3005,'NULL',30);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into emple values(7782 ,'CEREZO',
'DIRECTOR' ,7839, 1991/06/09,2885,'NULL',10);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into emple
values(7788,'GIL','ANALISTA',7566, 1991/1/09 ,3000 ,'NULL' ,20);
Query OK, 1 row affected (0.00 sec)
mysql> insert into emple
values(7839,'REY','PRESIDENTE',NULL, 1991/11/17 , 4100,'NULL',10);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into emple
values(7844,'TOVAR','VENDEDOR',7698,1991/09/08,1350,'0',30);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into emple
values(7876,'ALONSO','EMPLEADO',7876,1991/09/23,1430,'NULL',20);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into emple values(7900 ,'JIMENO'
,'EMPLEADO', 7698, 1991/12/03 ,1335,'NULL',30);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into emple
values(7902,'FERNANDEZ','ANALISTA',7566, 1991/12/03,3000,'NULL',20);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into emple
values(7934,'MUNOZ','EMPLEADO',7782,1992/01/23,1690,'NULL',10);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> select * from emple;
+----------+-----------+------------+------+------------+---------+----------+---------+
| emple_no | apellido
| oficio | dir | fecha_alt
| salario | comision | dept_no |
+----------+-----------+------------+------+------------+---------+----------+---------+
| 7369 |
sanchez | empleado | 7902 | 0000-00-00 | 1040 | null |
20 |
| 7499 |
arroyo | vendedor | 7698 | 0000-00-00 | 1500 | 390 |
30 |
| 7521 |
sala | vendedor | 7339 | 0000-00-00 | 1625 | 650 |
30 |
| 7556 |
JIMENEZ | DIRECTOR | 7698 | 0000-00-00 | 2900 | NULL |
20 |
| 7654 |
MARTIN | VENDEDOR | 7839 | 0000-00-00 | 1600 | 1020 |
30 |
| 7698 |
NEGRO | DIRECTOR | 7698 | 0000-00-00 | 3005 | NULL |
30 |
| 7782 | CEREZO | DIRECTOR
| 7839 | 0000-00-00 | 2885 |
NULL |
10 |
| 7788 |
GIL | ANALISTA | 7566 | 2000-02-21 | 3000 | NULL |
20 |
| 7839 |
REY | PRESIDENTE | NULL |
0000-00-00 | 4100 | NULL |
10 |
| 7844 |
TOVAR | VENDEDOR | 7698 | 0000-00-00 | 1350 | 0
|
30 |
| 7876 |
ALONSO | EMPLEADO | 7876 | 0000-00-00 | 1430 | NULL |
20 |
| 7900 |
JIMENO | EMPLEADO | 7698 | 0000-00-00 | 1335 | NULL |
30 |
| 7902 |
FERNANDEZ | ANALISTA | 7566 |
0000-00-00 | 3000 | NULL |
20 |
| 7934 |
MUNOZ | EMPLEADO | 7782 | 0000-00-00 | 1690 | NULL |
10 |
+----------+-----------+------------+------+------------+---------+----------+---------+
14 rows in set (0.00 sec)
mysql> create table depart(dept_no integer primary
key,dnombre varchar(10),loc v
archar(10));
Query OK, 0 rows affected (0.02 sec)
mysql> insert into depart
values(10,'CONTABILIDAD','SEVILLA');
Query OK, 1 row affected, 1 warning (0.02 sec)
mysql> insert into depart
values(20,'INVESTIGACION','MADRID');
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into depart
values(30,'VENTAS','BARCELONA');
Query OK, 1 row affected (0.00 sec)
mysql> select * from depart;
+---------+------------+-----------+
| dept_no | dnombre
| loc |
+---------+------------+-----------+
| 10 |
CONTABILID | SEVILLA |
| 20 |
INVESTIGAC | MADRID |
| 30 |
VENTAS | BARCELONA |
+---------+------------+-----------+
3 rows in set (0.00 sec)
mysql>
select apellido,oficio,dept_no from emple;
+-----------+------------+---------+
|
apellido | oficio | dept_no |
+-----------+------------+---------+
| SANCHEZ | EMPLEADO
| 20 |
| ARROYO | VENDEDOR
| 30 |
| SALA | VENDEDOR |
30 |
| JIMENEZ | DIRECTOR
| 20 |
| MARTIN | VENDEDOR
| 30 |
| NEGRO | DIRECTOR |
30 |
| CEREZO | DIRECTOR
| 10 |
| GIL | ANALISTA | 20 |
| REY | PRESIDENTE | 10 |
| TOVAR | VENDEDOR |
30 |
| ALONSO | EMPLEADO
| 20 |
| JIMENO | EMPLEADO
| 30 |
| FERNANDEZ |
ANALISTA | 20 |
| MU | EMPLEADO |
10 |
+-----------+------------+---------+
14 rows in set
(0.00 sec)
Query OK, 1 row affected, 2 warnings (0.05 sec)
5 rows in set
(0.01 sec)
mysql>
select dept_no,dnombre,loc from depart;
+---------+------------+-----------+
| dept_no |
dnombre | loc |
+---------+------------+-----------+
| 10 | CONTABILID | SEVILLA |
| 20 | INVESTIGAC | MADRID |
| 30 | VENTAS | BARCELONA |
+---------+------------+-----------+
3 rows in set
(0.20 sec)
mysql>
select * from emple;
+----------+-----------+------------+------+------------+---------+----------+---------+
| emple_no |
apellido | oficio | dir
| fecha_alt | salario | comision
| d
ept_no |
+----------+-----------+------------+------+------------+---------+----------+---------+
| 7369 | SANCHEZ | EMPLEADO
| 7902 | 0000-00-00 | 1040
| NULL |
20 |
| 7499 | ARROYO | VENDEDOR
| 7698 | 0000-00-00 | 1500
| 390 |
30 |
| 7521 | SALA | VENDEDOR | 7339 | 0000-00-00 | 1625 |
650 |
30 |
| 7566 | JIMENEZ | DIRECTOR
| 7698 | 0000-00-00 | 2900
| NULL |
20 |
| 7654 | MARTIN | VENDEDOR
| 7839 | 0000-00-00 | 1600
| 1020 |
30 |
| 7698 | NEGRO | DIRECTOR | 7698 | 0000-00-00 | 3005 |
NULL |
30 |
| 7782 | CEREZO | DIRECTOR
| 7839 | 0000-00-00 | 2885
| NULL |
10 |
| 7788 | GIL | ANALISTA | 7566 | 0000-00-00 | 3000 |
NULL |
20 |
| 7839 | REY | PRESIDENTE | NULL | 0000-00-00 | 4100 |
NULL |
10 |
| 7844 | TOVAR | VENDEDOR | 7698 | 0000-00-00 | 1350 |
0 |
30 |
| 7876 | ALONSO | EMPLEADO
| 7788 | 0000-00-00 | 1430
| NULL |
20 |
| 7900 | JIMENO | EMPLEADO
| 7698 | 0000-00-00 | 1335
| NULL |
30 |
| 7902 | FERNANDEZ | ANALISTA | 7566 | 0000-00-00 | 3000 |
NULL |
20 |
| 7934 | MU | EMPLEADO | 7782 | 0000-00-00 | 1690 |
NULL |
10 |
+----------+-----------+------------+------+------------+---------+----------+--------+
14 rows in set
(0.00 sec)
mysql>
select * from emple order by apellido;
+----------+-----------+------------+------+------------+---------+----------+---------+
| emple_no |
apellido | oficio | dir
| fecha_alt | salario | comision
| d
ept_no |
+----------+-----------+------------+------+------------+---------+----------+---------+
| 7876 | ALONSO | EMPLEADO
| 7788 | 0000-00-00 | 1430
| NULL |
20 |
| 7499 | ARROYO | VENDEDOR
| 7698 | 0000-00-00 | 1500
| 390 |
30 |
| 7782 | CEREZO | DIRECTOR
| 7839 | 0000-00-00 | 2885
| NULL |
10 |
| 7902 | FERNANDEZ | ANALISTA | 7566 | 0000-00-00 | 3000 |
NULL |
20 |
| 7788 | GIL | ANALISTA | 7566 | 0000-00-00 | 3000 |
NULL |
20 |
| 7566 | JIMENEZ | DIRECTOR
| 7698 | 0000-00-00 | 2900
| NULL |
20 |
| 7900 | JIMENO | EMPLEADO
| 7698 | 0000-00-00 | 1335
| NULL |
30 |
| 7654 | MARTIN | VENDEDOR
| 7839 | 0000-00-00 | 1600
| 1020 |
30 |
| 7934 | MU | EMPLEADO | 7782 | 0000-00-00 | 1690 |
NULL |
10 |
| 7698 | NEGRO | DIRECTOR | 7698 | 0000-00-00 | 3005 |
NULL |
30 |
| 7839 | REY |
PRESIDENTE | NULL | 0000-00-00 | 4100
| NULL |
10 |
| 7521 | SALA | VENDEDOR | 7339 | 0000-00-00 | 1625 |
650 |
30 |
| 7369 | SANCHEZ | EMPLEADO
| 7902 | 0000-00-00 | 1040
| NULL |
20 |
| 7844 | TOVAR | VENDEDOR | 7698 | 0000-00-00 | 1350 | 0 |
30 |
+----------+-----------+------------+------+------------+---------+----------+---------+
14 rows in set
(0.06 sec)
mysql>
select * from emple order by dept_no desc;
+----------+-----------+------------+------+------------+---------+----------+---------+
| emple_no |
apellido | oficio | dir
| fecha_alt | salario | comision
| d
ept_no |
+----------+-----------+------------+------+------------+---------+----------+---------+
| 7499
| ARROYO | VENDEDOR | 7698 | 0000-00-00 | 1500 |
390 |
30 |
| 7521 | SALA | VENDEDOR | 7339 | 0000-00-00 | 1625 |
650 |
30 |
| 7654 | MARTIN | VENDEDOR
| 7839 | 0000-00-00 | 1600
| 1020 |
30 |
| 7698 | NEGRO | DIRECTOR | 7698 | 0000-00-00 | 3005 |
NULL |
30 |
| 7900 | JIMENO | EMPLEADO
| 7698 | 0000-00-00 | 1335
| NULL |
30 |
| 7844 | TOVAR | VENDEDOR | 7698 | 0000-00-00 | 1350 |
0 |
30 |
| 7369 | SANCHEZ | EMPLEADO
| 7902 | 0000-00-00 | 1040
| NULL |
20 |
| 7902 | FERNANDEZ | ANALISTA | 7566 | 0000-00-00 | 3000 |
NULL |
20 |
| 7876 | ALONSO | EMPLEADO
| 7788 | 0000-00-00 | 1430 | NULL |
20 |
| 7788 | GIL | ANALISTA | 7566 | 0000-00-00 | 3000 |
NULL |
20 |
| 7566 | JIMENEZ | DIRECTOR
| 7698 | 0000-00-00 | 2900
| NULL |
20 |
| 7839 | REY | PRESIDENTE | NULL | 0000-00-00 | 4100
| NULL |
10 |
| 7782 | CEREZO | DIRECTOR
| 7839 | 0000-00-00 | 2885
| NULL |
10 |
| 7934 | MU | EMPLEADO | 7782 | 0000-00-00 | 1690 |
NULL |
10 |
+----------+-----------+------------+------+------------+---------+----------+---------+
14 rows in set
(0.00 sec)
mysql>
select * from emple order by dept_no desc,apellido;
+----------+-----------+------------+------+------------+---------+----------+---------+
| emple_no |
apellido | oficio | dir
| fecha_alt | salario | comision
| d
ept_no |
+----------+-----------+------------+------+------------+---------+----------+---------+
| 7499 | ARROYO | VENDEDOR
| 7698 | 0000-00-00 | 1500
| 390 |
30 |
| 7900 | JIMENO | EMPLEADO
| 7698 | 0000-00-00 | 1335
| NULL |
30 |
| 7654 | MARTIN | VENDEDOR
| 7839 | 0000-00-00 | 1600
| 1020 |
30 |
| 7698 | NEGRO | DIRECTOR | 7698 | 0000-00-00 | 3005 |
NULL |
30 |
| 7521 | SALA | VENDEDOR | 7339 | 0000-00-00 | 1625 |
650 |
30 |
| 7844 | TOVAR | VENDEDOR | 7698 | 0000-00-00 | 1350 |
0 |
30 |
| 7876 | ALONSO | EMPLEADO
| 7788 | 0000-00-00 | 1430
| NULL |
20 |
| 7902 | FERNANDEZ | ANALISTA | 7566 | 0000-00-00 | 3000 |
NULL |
20 |
| 7788 | GIL | ANALISTA | 7566 | 0000-00-00 | 3000 |
NULL |
20 |
| 7566 | JIMENEZ | DIRECTOR
| 7698 | 0000-00-00 | 2900
| NULL |
20 |
| 7369 | SANCHEZ | EMPLEADO
| 7902 | 0000-00-00 | 1040
| NULL |
20 |
| 7782 | CEREZO | DIRECTOR
| 7839 | 0000-00-00 | 2885
| NULL |
10 |
| 7934 | MU | EMPLEADO | 7782 | 0000-00-00 | 1690 |
NULL |
10 |
| 7839 | REY | PRESIDENTE | NULL | 0000-00-00 | 4100 |
NULL |
10 |
+----------+-----------+------------+------+------------+---------+----------+---------+
14 rows in set
(0.00 sec)
mysql>
select * from emple where salario > 2000000;
Empty set
(0.09 sec)
mysql>
select * from emple where oficio='ANALISTA';
+----------+-----------+----------+------+------------+---------+----------+---------+
| emple_no |
apellido | oficio | dir
| fecha_alt | salario | comision
| dep
t_no |
+----------+-----------+----------+------+------------+---------+----------+---------+
| 7788 | GIL | ANALISTA | 7566 | 0000-00-00 | 3000 |
NULL |
20 |
| 7902 | FERNANDEZ | ANALISTA | 7566 | 0000-00-00
| 3000 | NULL |
20 |select*from
+----------+-----------+----------+------+------------+---------+----------+---------+
2 rows in set
(0.00 sec)
mysql>
select apellido,oficio from emple where dept_no=20;
+-----------+----------+
| apellido | oficio
|
+-----------+----------+
| SANCHEZ | EMPLEADO |
| JIMENEZ | DIRECTOR |
| GIL | ANALISTA |
| ALONSO | EMPLEADO |
| FERNANDEZ |
ANALISTA |
+-----------+----------+
5 rows in set
(0.01 sec)
mysql> select*from emple order by apellido;
+----------+-----------+------------+------+------------+---------+----------+---------+
| emple_no | apellido
| oficio | dir | fecha_alt
| salario | comision | d
ept_no |
+----------+-----------+------------+------+------------+---------+----------+---------+
| 7876 |
ALONSO | EMPLEADO | 7876 | 0000-00-00 | 1430 | NULL |
20 |
| 7499 |
ARROYO | VENDEDOR | 7698 | 0000-00-00 | 1500 | 390 |
30 |
| 7782 |
CEREZO | DIRECTOR | 7839 | 0000-00-00 | 2885 | NULL |
10 |
| 7902 |
FERNANDEZ | ANALISTA | 7566 |
0000-00-00 | 3000 | NULL |
20 |
| 7788 |
GIL | ANALISTA | 7566 | 2000-02-21 | 3000 | NULL |
20 |
| 7556 |
JIMENEZ | DIRECTOR | 7698 | 0000-00-00 | 2900 | NULL |
20 |
| 7900 |
JIMENO | EMPLEADO | 7698 | 0000-00-00 | 1335 | NULL |
30 |
| 7654 |
MARTIN | VENDEDOR | 7839 | 0000-00-00 | 1600 | 1020 |
30 |
| 7934 |
MUNOZ | EMPLEADO | 7782 | 0000-00-00 | 1690 | NULL |
10 |
| 7698 |
NEGRO | DIRECTOR | 7698 | 0000-00-00 | 3005 | NULL |
30 |
| 7839 |
REY | PRESIDENTE | NULL |
0000-00-00 | 4100 | NULL |
10 |
| 7521 |
SALA | VENDEDOR | 7339 | 0000-00-00 | 1625 | 650 |
30 |
| 7369 |
SANCHEZ | EMPLEADO | 7902 | 0000-00-00 | 1040 | NULL |
20 |
| 7844 |
TOVAR | VENDEDOR | 7698 | 0000-00-00 | 1350 | 0
|
30 |
+----------+-----------+------------+------+------------+---------+----------+---------+
14 rows in set (0.00 sec)
mysql> select*from emple where
oficio='VENDEDOR'order by apellido;
+----------+----------+----------+------+------------+---------+----------+---------+
| emple_no | apellido | oficio | dir
| fecha_alt | salario | comision
| dept
_no |
+----------+----------+----------+------+------------+---------+----------+---------+
| 7499 |
ARROYO | VENDEDOR | 7698 | 0000-00-00
| 1500 | 390 |
30 |
| 7654 | MARTIN
| VENDEDOR | 7839 | 0000-00-00 |
1600 | 1020 |
30 |
| 7521 |
SALA | VENDEDOR | 7339 | 0000-00-00
| 1625 | 650 |
30 |
| 7844 |
TOVAR | VENDEDOR | 7698 | 0000-00-00
| 1350 | 0 |
30 |
+----------+----------+----------+------+------------+---------+----------+---------+
4 rows in set (0.00 sec)
mysql> select*from emple where dept_no=10 and
oficio='ANALISTA';
Empty set (0.00 sec)
mysql> select*from emple where salario>200000 or
dept_no=20;
+----------+-----------+----------+------+------------+---------+----------+---------+
| emple_no | apellido
| oficio | dir | fecha_alt
| salario | comision | dep
t_no |
+----------+-----------+----------+------+------------+---------+----------+---------+
| 7369 |
SANCHEZ | EMPLEADO | 7902 | 0000-00-00
| 1040 | NULL |
20 |
| 7556 |
JIMENEZ | DIRECTOR | 7698 | 0000-00-00
| 2900 | NULL |
20 |
| 7788 |
GIL | ANALISTA | 7566 | 2000-02-21
| 3000 | NULL |
20 |
| 7876 |
ALONSO | EMPLEADO | 7876 | 0000-00-00
| 1430 | NULL |
20 |
| 7902 |
FERNANDEZ | ANALISTA | 7566 | 0000-00-00 |
3000 | NULL |
20 |
+----------+-----------+----------+------+------------+---------+----------+---------+
5 rows in set (0.00 sec)
mysql> select*from emple order by oficio,apellido;
+----------+-----------+------------+------+------------+---------+----------+---------+
| emple_no | apellido
| oficio | dir | fecha_alt
| salario | comision | d
ept_no |
+----------+-----------+------------+------+------------+---------+----------+---------+
| 7902 |
FERNANDEZ | ANALISTA | 7566 |
0000-00-00 | 3000 | NULL |
20 |
| 7788 |
GIL | ANALISTA | 7566 | 2000-02-21 | 3000 | NULL |
20 |
| 7782 |
CEREZO | DIRECTOR | 7839 | 0000-00-00 | 2885 | NULL |
10 |
| 7556 |
JIMENEZ | DIRECTOR | 7698 | 0000-00-00 | 2900 | NULL |
20 |
| 7698 |
NEGRO | DIRECTOR | 7698 | 0000-00-00 | 3005 | NULL |
30 |
| 7876 |
ALONSO | EMPLEADO | 7876 | 0000-00-00 | 1430 | NULL |
20 |
| 7900 |
JIMENO | EMPLEADO | 7698 | 0000-00-00 | 1335 | NULL |
30 |
| 7934 |
MUNOZ | EMPLEADO | 7782 | 0000-00-00 | 1690 | NULL |
10 |
| 7369 |
SANCHEZ | EMPLEADO | 7902 | 0000-00-00 | 1040 | NULL |
20 |
| 7839 |
REY | PRESIDENTE | NULL |
0000-00-00 | 4100 | NULL |
10 |
| 7499 |
ARROYO | VENDEDOR | 7698 | 0000-00-00 | 1500 | 390 |
30 |
| 7654 |
MARTIN | VENDEDOR | 7839 | 0000-00-00 | 1600 | 1020 |
30 |
| 7521 |
SALA | VENDEDOR | 7339 | 0000-00-00 | 1625 | 650 |
30 |
| 7844 |
TOVAR | VENDEDOR | 7698 | 0000-00-00 | 1350 | 0 |
30 |
+----------+-----------+------------+------+------------+---------+----------+--
-------+
14 rows in set (0.00 sec)
mysql> select*from emple where apellido like'A*';
Empty set (0.00 sec)
mysql> select*from emple where apellido like'*Z';
Empty set (0.00 sec)
mysql> select*from emple where apellido like 'A*'
and oficio like 'E*';
Empty set (0.00 sec)
mysql> select*from emple where salario between
100000 and 2000000;
Empty set (0.00 sec)
mysql> select*from emple where oficio='VENDEDOR'
and comision> 100000;
Empty set (0.00 sec)
mysql> select*from emple order by dept_no,apellido;
+----------+-----------+------------+------+------------+---------+----------+--
-------+
| emple_no | apellido
| oficio | dir | fecha_alt
| salario | comision | d
ept_no |
+----------+-----------+------------+------+------------+---------+----------+--
-------+
| 7782 |
CEREZO | DIRECTOR | 7839 | 0000-00-00 | 2885 | NULL |
10 |
| 7934 | MUNOZ | EMPLEADO | 7782 | 0000-00-00 | 1690 | NULL |
10 |
| 7839 |
REY | PRESIDENTE | NULL |
0000-00-00 | 4100 | NULL |
10 |
| 7876 |
ALONSO | EMPLEADO | 7876 | 0000-00-00 | 1430 | NULL |
20 |
| 7902 |
FERNANDEZ | ANALISTA | 7566 |
0000-00-00 | 3000 | NULL |
20 |
| 7788 |
GIL | ANALISTA | 7566 | 2000-02-21 | 3000 | NULL |
20 |
| 7556 |
JIMENEZ | DIRECTOR | 7698 | 0000-00-00 | 2900 | NULL |
20 |
| 7369 |
SANCHEZ | EMPLEADO | 7902 | 0000-00-00 | 1040 | NULL
|
20 |
| 7499 |
ARROYO | VENDEDOR | 7698 | 0000-00-00 | 1500 | 390 |
30 |
| 7900 |
JIMENO | EMPLEADO | 7698 | 0000-00-00 | 1335 | NULL |
30 |
| 7654 |
MARTIN | VENDEDOR | 7839 | 0000-00-00 | 1600 | 1020 |
30 |
| 7698 |
NEGRO | DIRECTOR | 7698 | 0000-00-00 | 3005 | NULL |
30 |
| 7521 |
SALA | VENDEDOR | 7339 | 0000-00-00 | 1625 | 650
|
30 |
| 7844 |
TOVAR | VENDEDOR | 7698 | 0000-00-00 | 1350 | 0
|
30 |
+----------+-----------+------------+------+------------+---------+----------+--
-------+
14 rows in set (0.00 sec)
mysql> select emple_no,apellido from emple where
apellido like'Z*' and salario>3
0000;
Empty set (0.00 sec)
mysql> select*from depart where loc like'B*';
Empty set (0.00 sec)
mysql> select*from emple where oficio='EMPLEADO'and
salario >100000 and dept_no=
10;
Empty set (0.00 sec)
mysql> select*from emple where comision is NULL;
Empty set (0.00 sec)
No hay comentarios.:
Publicar un comentario