Command Prompt - mysql -u root -p arslan
Command Prompt - mysql -u root -p arslan
4460]
(c) Microsoft Corporation. All rights reserved.
C:\Users\RAFAT>mysql -u root -p
Enter password: ********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 24
Server version: 8.0.40 MySQL Community Server - GPL
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> select
bookno,bookname,dateofpublition,CONCAT(DAY(dateofpublition),",",MONTHNAME(dateofpub
lition),",",YEAR(dateofpublition)) as "Starting Date"from b
-> select
sno,sname,dateofdefault,CONCAT(DAY(dateofdefault),",",MONTHNAME(dateofdefault),",",
YEAR(dateofdefault)) as "Starting Date"from defaulter;
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 'select
sno,sname,dateofdefault,CONCAT(DAY(dateofdefault),",",MONTHNAME(dateofdef' at line
2
mysql> select
sno,sname,dateofdefault,CONCAT(DAY(dateofdefault),",",MONTHNAME(dateofdefault),",",
YEAR(dateofdefault)) as "Starting Date"from defaulter;
+-----+--------+---------------+-----------------+
| sno | sname | dateofdefault | Starting Date |
+-----+--------+---------------+-----------------+
| 1 | Zahid | 2024-10-01 | 1,October,2024 |
| 2 | Arslan | 2024-10-03 | 3,October,2024 |
| 3 | Rafat | 2024-10-07 | 7,October,2024 |
| 4 | Akshat | 2024-10-20 | 20,October,2024 |
| 5 | Ashu | 2024-10-21 | 21,October,2024 |
| 6 | Sultan | 2024-10-27 | 27,October,2024 |
| 7 | Zuhaib | 2024-10-29 | 29,October,2024 |
| 8 | Adarsh | 2024-11-02 | 2,November,2024 |
| 9 | Sahil | 2024-11-05 | 5,November,2024 |
| 10 | Sahiba | 2024-11-09 | 9,November,2024 |
+-----+--------+---------------+-----------------+
10 rows in set (0.00 sec)
mysql>