SQL Queries
SQL Queries
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
+--------------------+
| Database |
+--------------------+
| information_schema |
| kvs |
| mysql |
| performance_schema |
| sys |
+--------------------+
Database changed
+---------+-------------+------+-----+---------+-------+
+---------+-------------+------+-----+---------+-------+
+---------+-------------+------+-----+---------+-------+
+---------------+
| Tables_in_kvs |
+---------------+
| cs11 |
+---------------+
+---------+------------+---------+-----------+
+---------+------------+---------+-----------+
+---------+------------+---------+-----------+
->
->
->
-> ^X
->
-> clear
->
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 '↑
clear
+---------+------------+---------+-----------+
+---------+------------+---------+-----------+
+---------+------------+---------+-----------+
+---------+------------+---------+-----------+---------+
+---------+------------+---------+-----------+---------+
+---------+------------+---------+-----------+---------+
+---------+------------+---------+-----------+---------+
+---------+------------+---------+-----------+---------+
+---------+------------+---------+-----------+---------+
+---------+------------+---------+-----------+---------+
+---------+------------+---------+-----------+---------+
+---------+------------+---------+-----------+-----------+
+---------+------------+---------+-----------+-----------+
+---------+------------+---------+-----------+-----------+
+---------+
| Roll_no |
+---------+
| 11101 |
| 11102 |
| 11113 |
+---------+
3 rows in set (0.00 sec)
+---------+------------+
| Roll_no | Name |
+---------+------------+
| 11102 | Anshu |
| 11113 | Rahul |
+---------+------------+
+---------+------------+
| Roll_no | Name |
+---------+------------+
+---------+------------+
mysql> insert into cs11 values(11112, "Piyush Raj", "Tata House", 456789123);
ERROR 1136 (21S01): Column count doesn't match value count at row 1
mysql> insert into cs11 values(11112, "Piyush Raj", "Tata House", 456789123, "Physics");
mysql> insert into cs11 values(11104, "Aayush Gupta", "Wadsar", 886789123, "Maths");
+---------+--------------+------------+-----------+-----------+
+---------+--------------+------------+-----------+-----------+
+---------+--------------+------------+-----------+-----------+
+---------+--------------+------------+-----------+-----------+
+---------+--------------+------------+-----------+-----------+
+---------+--------------+------------+-----------+-----------+
+---------+--------------+------------+-----------+-----------+
+---------+--------------+------------+-----------+-----------+
+---------+--------------+------------+-----------+-----------+
+---------+--------------+------------+-----------+-----------+
+---------+--------------+------------+-----------+-----------+
+---------+--------------+------------+-----------+-----------+
+---------+--------------+------------+-----------+-----------+
+---------+--------------+------------+-----------+-----------+
+---------+--------------+------------+-----------+-----------+
+---------+--------------+------------+-----------+-----------+
+---------+--------------+------------+-----------+-----------+
+---------+--------------+---------+-----------+-----------+
+---------+--------------+---------+-----------+-----------+
+---------+--------------+---------+-----------+-----------+
+---------+------------+------------+-----------+---------+
+---------+------------+------------+-----------+---------+
+---------+------------+------------+-----------+---------+
mysql> select * from cs11 where Roll_no between 11101 and 11110;
+---------+--------------+------------+-----------+-----------+
+---------+--------------+------------+-----------+-----------+
+---------+--------------+------------+-----------+-----------+
mysql>