Professional Documents
Culture Documents
COMMANDS
Q1. mysql> create database A1;
Query OK, 1 row affected (0.02 sec)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> select ename from employee where job not like 'manager';
+--------+
| ename |
+--------+
| SMITH |
| ALLEN |
| WARD |
| MARTIN |
| SCOTT |
| KING |
| TURNER |
| ADAMS |
| JAMES |
| FORD |
| MILLER |
+--------+
11 rows in set (0.00 sec)
mysql>
Q1. Find the names of sailors 'Who have reserved boat number 103.
Q2. Find the sids of sailors who have Reserved a red boat.
+-----+-------+
| sid | color |
+-----+-------+
| 22 | red |
Q4. Find sid of sailors who have reserved red or green boats.
Q5. Find sailors name who have reserved red or green boats.
+-----+-----------+-------+
| sid | bname | color |
+-----+-----------+-------+
| 22 | interlake | red |
| 22 | clipper | green |
| 22 | marine | red |
Q6 . Find sailors name who have reserved red AND green boats.
Q7. Find the sids of all sailor's who have reserved red boats but not green
boats.