You are on page 1of 2

1. select salesman.name, customers.

cust_name,
customers.city from customers, salesman where
salesman.city=customers.city; *

2. select customers.cust_name, customers.city,


salesman.name, salesman.commission from salesman,
customers where salesman.commission>0.12 and
customers.salesman_id=salesman.salesman_id;

3. select customers.cust_name, customers.city,


salesman.name, salesman.commission from salesman,
customers where
salesman.salesman_id=customers.salesman_id;*

4. select customers.cust_name, customers.city,


customers.grade,salesman.name, salesman.city from
salesman, customers where
customers.salesman_id=salesman.salesman_id order by
customers.customer_id;
mysql> alter table salesman modify commission decimal(10,2) not
null;
Query OK, 6 rows affected (0.05 sec)
Records: 6 Duplicates: 0 Warnings: 0

mysql> update salesman set commission=0.15 where


salesman_id=5001;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

You might also like