show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| company            |
| fycsdemo1          |
| fycsdemo56         |
| fyds               |
| joins              |
| logindb            |
| logindb22          |
| mysql              |
| performance_schema |
| peru               |
| root               |
| sakila             |
| seema              |
| serve              |
| stud               |
| stud1              |
| student            |
| students           |
| sycs               |
| test               |
| umar1              |
| world              |
| yashzayn           |
+--------------------+
24 rows in set (0.01 sec)

mysql> use company;
Database changed
mysql> select * from product;
+-----+------------+-------+---------+------+
| Pid | Pname      | price | MFR     | QOH  |
+-----+------------+-------+---------+------+
|   1 | phone      | 20000 | LG      |   50 |
|   2 | laptop     | 45000 | HP      |   30 |
|   3 | AC         | 26000 | DAIKIN  |   15 |
|   4 | tab        | 50000 | SAMSUNG |   23 |
|   5 | SmartWatch | 40000 | SAMSUNG |   33 |
+-----+------------+-------+---------+------+
5 rows in set (0.00 sec)

mysql> select * from orders;
+-----+------------+----------+------+------+---------+
| Ono | Odate      | customer | Pid  | qty  | Oamount |
+-----+------------+----------+------+------+---------+
|   1 | 2023-03-23 | abc      |    1 |    1 |    2000 |
|   2 | 2023-03-15 | sakshi   |    2 |    4 |   45000 |
|   3 | 2023-03-13 | rutuja   |    3 |    5 |   50000 |
|   4 | 2023-03-17 | nutan    |    4 |    6 |   26000 |
|   5 | 2023-03-18 | suraj    |    5 |    7 |   40000 |
+-----+------------+----------+------+------+---------+
5 rows in set (0.00 sec)

mysql> select Pnames,price from product;
ERROR 1054 (42S22): Unknown column 'Pnames' in 'field list'
mysql> select Pname,price from product;
+------------+-------+
| Pname      | price |
+------------+-------+
| phone      | 20000 |
| laptop     | 45000 |
| AC         | 26000 |
| tab        | 50000 |
| SmartWatch | 40000 |
+------------+-------+
5 rows in set (0.00 sec)

mysql> selct * from product where MFR="LG";
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 'selct * from product where MFR="LG"' at line 1
mysql> selct * from product where MFR='LG';
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 'selct * from product where MFR='LG'' at line 1
mysql> selct * from product where MFR=LG;
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 'selct * from product where MFR=LG' at line 1
mysql> select * from product where MFR='LG';
+-----+-------+-------+------+------+
| Pid | Pname | price | MFR  | QOH  |
+-----+-------+-------+------+------+
|   1 | phone | 20000 | LG   |   50 |
+-----+-------+-------+------+------+
1 row in set (0.00 sec)

mysql> select qty from product where qty between 50 and 100;
ERROR 1054 (42S22): Unknown column 'qty' in 'field list'
mysql> select QOH from product where QOH between 50 and 100;
+------+
| QOH  |
+------+
|   50 |
+------+
1 row in set (0.00 sec)

mysql> select * from orders where name like 'a%';
ERROR 1054 (42S22): Unknown column 'name' in 'where clause'
mysql> select * from orders where customer like 'a%';
+-----+------------+----------+------+------+---------+
| Ono | Odate      | customer | Pid  | qty  | Oamount |
+-----+------------+----------+------+------+---------+
|   1 | 2023-03-23 | abc      |    1 |    1 |    2000 |
+-----+------------+----------+------+------+---------+
1 row in set (0.00 sec)

mysql> update orders set customer=NULL where Pid=1;
ERROR 1048 (23000): Column 'customer' cannot be null
mysql> update orders set customer="  " where Pid=1;
Query OK, 1 row affected (0.03 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> select * from orders;
+-----+------------+----------+------+------+---------+
| Ono | Odate      | customer | Pid  | qty  | Oamount |
+-----+------------+----------+------+------+---------+
|   1 | 2023-03-23 |          |    1 |    1 |    2000 |
|   2 | 2023-03-15 | sakshi   |    2 |    4 |   45000 |
|   3 | 2023-03-13 | rutuja   |    3 |    5 |   50000 |
|   4 | 2023-03-17 | nutan    |    4 |    6 |   26000 |
|   5 | 2023-03-18 | suraj    |    5 |    7 |   40000 |
+-----+------------+----------+------+------+---------+
5 rows in set (0.00 sec)

mysql> select * from orders where name like NULL;
ERROR 1054 (42S22): Unknown column 'name' in 'where clause'
mysql> select * from orders where customer like NULL;
Empty set (0.00 sec)

mysql> select * from orders where customer like ;
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> select * from orders where customer like " ";
Empty set (0.00 sec)

mysql> select * from orders where customere= " ";
ERROR 1054 (42S22): Unknown column 'customere' in 'where clause'
mysql> select * from orders where customer= " ";
+-----+------------+----------+------+------+---------+
| Ono | Odate      | customer | Pid  | qty  | Oamount |
+-----+------------+----------+------+------+---------+
|   1 | 2023-03-23 |          |    1 |    1 |    2000 |
+-----+------------+----------+------+------+---------+
1 row in set (0.00 sec)

mysql> select customer from orders where Ono in(5,3,2,4);
+----------+
| customer |
+----------+
| sakshi   |
| rutuja   |
| nutan    |
| suraj    |
+----------+
4 rows in set (0.00 sec)

mysql> select QOH from product where QOH between 50 and 100;
+------+
| QOH  |
+------+
|   50 |
+------+
1 row in set (0.00 sec)

mysql> +------+
    -> | QOH  |
    -> +------+
    -> |   50 |
    -> +------+
    -> 1 row in set (0.00 sec)
    -> ;
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 '+------+
| QOH  |
+------+
|   50 |
+------+
1 row in set (0.00 sec)' at line 1
mysql> ;
ERROR:
No query specified

mysql> |   50 |
    -> ;
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 '|   50 |' at line 1
mysql> select Ono,Pid,qty where oamount>30,000;
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 'where oamount>30,000' at line 1
mysql> select Ono,Pid,qty where Oamount>30,000;
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 'where Oamount>30,000' at line 1
mysql> select Ono,Pid,qty from orders where Oamount>30,000;
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 '000' at line 1
mysql> select Ono,Pid,qty from orders where Oamount>30000;
+-----+------+------+
| Ono | Pid  | qty  |
+-----+------+------+
|   2 |    2 |    4 |
|   3 |    3 |    5 |
|   5 |    5 |    7 |
+-----+------+------+
3 rows in set (0.00 sec)

mysql> select pname from product where price >30000;
+------------+
| pname      |
+------------+
| laptop     |
| tab        |
| SmartWatch |
+------------+
3 rows in set (0.00 sec)

mysql> select pname=SAMSUNG from product where price >30000;
ERROR 1054 (42S22): Unknown column 'SAMSUNG' in 'field list'
mysql> select pname from product where MRF=SAMSUNG and price >30000;
ERROR 1054 (42S22): Unknown column 'MRF' in 'where clause'
mysql> select pname from product where MFR=SAMSUNG and price >30000;
ERROR 1054 (42S22): Unknown column 'SAMSUNG' in 'where clause'
mysql> select pname from product where MFR=SAMSUNG and price >30000;
ERROR 1054 (42S22): Unknown column 'SAMSUNG' in 'where clause'
mysql> select pname from product where MFR='SAMSUNG' and price >30000;
+------------+
| pname      |
+------------+
| tab        |
| SmartWatch |
+------------+
2 rows in set (0.00 sec)

mysql> SELECT PNAME FORM ORDERS WHERE QTY>5 OR OAMOUNT>50000;
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 'ORDERS WHERE QTY>5 OR OAMOUNT>50000' at line 1
mysql> SELECT * FORM ORDERS WHERE QTY>5 OR OAMOUNT>50000;
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 'FORM ORDERS WHERE QTY>5 OR OAMOUNT>50000' at line 1
mysql> SELECT * FROM ORDERS WHERE QTY>5 OR OAMOUNT>50000;
+-----+------------+----------+------+------+---------+
| Ono | Odate      | customer | Pid  | qty  | Oamount |
+-----+------------+----------+------+------+---------+
|   4 | 2023-03-17 | nutan    |    4 |    6 |   26000 |
|   5 | 2023-03-18 | suraj    |    5 |    7 |   40000 |
+-----+------------+----------+------+------+---------+
2 rows in set (0.00 sec)

mysql>

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: