DBMS ass
DBMS ass
0\bin>mysql -u root -p
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
+--------------------+
| Database |
+--------------------+
| collage |
| hotel_management |
| information_schema |
| mysql |
| performance_schema |
| sakila |
| sys |
| world |
+--------------------+
+--------------------+
| Database |
+--------------------+
| ashish_chavan |
| collage |
| hotel_management |
| information_schema |
| mysql |
| performance_schema |
| sakila |
| sys |
| world |
+--------------------+
Database changed
-> );
+---------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+--------------+------+-----+---------+-------+
+---------+--------------+------+-----+---------+-------+
-> );
+--------------+--------------+------+-----+---------+-------+
+--------------+--------------+------+-----+---------+-------+
+--------------+--------------+------+-----+---------+-------+
-> ,
-> );
-> );
+----------------+--------------+------+-----+---------+-------+
+----------------+--------------+------+-----+---------+-------+
+----------------+--------------+------+-----+---------+-------+
-> );
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 'VALAUE(001,'ATOMIC HABIT','JAMES
CLEAR','NON FICTION',250.00,50),
VALAUE(002,'HA' at line 2
-> VALUES
-> );
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 'VALAUE(001,'ATOMIC HABIT','JAMES
CLEAR','NON FICTION',250.00,50),
VALAUE(002,'HA' at line 3
-> VALUES
-> );
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 5
-> VALUES
-> (001, 'ATOMIC HABIT', 'JAMES CLEAR', 'NON FICTION', 250.00, 50),
+---------+--------------+---------------------+-------------+--------+-------+
+---------+--------------+---------------------+-------------+--------+-------+
+---------+--------------+---------------------+-------------+--------+-------+
-> VALUES
-> (003, ' Discovery of India', 'Jawaharlal Nehru', 'HISTORY', 250.00, 25),
-> (004, ' SCIENCE AND TECHNOLOGY', 'RAVI.P.AGRAHAR', 'SCIENCE AND TECHNOLOGY', 400.00,
25),
-> (005, ' ENVIROMENTAL SUSTAINABILITY', 'KANE HARLOW', 'ENVIROMENT', 500.00, 25);
+---------+------------------------------+---------------------+------------------------+--------+-------+
+---------+------------------------------+---------------------+------------------------+--------+-------+
+---------+------------------------------+---------------------+------------------------+--------+-------+
5 rows in set (0.00 sec)
+-------------+----------------+------------------------+------------+--------------+
+-------------+----------------+------------------------+------------+--------------+
+-------------+----------------+------------------------+------------+--------------+
+----------------+-------------+---------+---------------+--------+
| 1| 1| 1 | 2025-02-20 | 299.99 |
| 2| 2| 3 | 2025-02-21 | 499.99 |
| 3| 1| 3 | 2025-02-22 | 699.99 |
| 4| 3| 4 | 2025-02-23 | 399.50 |
| 5| 4| 5 | 2025-02-24 | 599.00 |
+----------------+-------------+---------+---------------+--------+
ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails
(`ashish_chavan`.`transaction`, CONSTRAINT `transaction_ibfk_2` FOREIGN KEY (`BOOK_ID`)
REFERENCES `books` (`BOOK_ID`))
mysql> INSERT INTO BOOKS (BOOK_ID, TITLE, AUTHOR, GENRE, PRICE, STOCK)
-> VALUES
-> (4, 'Science and Technology', 'Ravi P. Agrahar', 'SCIENCE AND TECHNOLOGY', 400.00, 25),
+---------+------------------------------+---------------------+------------------------+--------+-------+
+---------+------------------------------+---------------------+------------------------+--------+-------+
+---------+------------------------------+---------------------+------------------------+--------+-------+
+---------+------------------------+---------------------+------------------------+--------+-------+
| PRICE | STOCK |
+---------+------------------------+---------------------+------------------------+--------+-------+
| 250.00 | 50 |
| 200.00 | 30 |
| 250.00 | 25 |
+---------+------------------------+---------------------+------------------------+--------+-------+
+---------+------------------------+---------------------+------------------------+--------+-------+
+---------+------------------------+---------------------+------------------------+--------+-------+
mysql> update
mysql>
mysql> ;
ERROR:
No query specified
+-------------+----------------+------------------------+------------+--------------+
+-------------+----------------+------------------------+------------+--------------+
+-------------+----------------+------------------------+------------+--------------+
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 'BY DESCENDING' at line 3
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 'BY PRICE DESC' at line 3
+---------+------------------------+---------------------+------------------------+--------+-------+
+---------+------------------------+---------------------+------------------------+--------+-------+
+---------+------------------------+---------------------+------------------------+--------+-------+
+------------------------+
| TITLE |
+------------------------+
| ATOMIC HABIT |
| Discovery of India |
| HAMLET |
+------------------------+
+-------------+-------------+
| CUSTOMER_ID | Total_Spent |
+-------------+-------------+
| 1| 299.99 |
+-------------+-------------+
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 'CUST_PH_NO
+--------------+--------------+------+-----+---------+-------+
+--------------+--------------+------+-----+---------+-------+
+--------------+--------------+------+-----+---------+-------+
-> (;
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 2
-> L;
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 '-> (1, 'Ashish Chavan',
'[email protected]', '7756845546', 'Pune'),
L' at line 2
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 '-> (1, 'Ashish Chavan',
'[email protected]', '7756845546', 'Pune'),
mysql>