-- Mar 2 Thread
mysql> create database THE_WORLD;
Query OK, 1 row affected (0.00 sec)
mysql> select THE_WORLD;
ERROR 1054 (42S22): Unknown column 'THE_WORLD' in 'field list'
mysql> use THE_WORLD;
Database changed
mysql> create table PERSON (id int, age int, first_name varchar(20), last_name v
archar(20));
Query OK, 0 rows affected (0.02 sec)
mysql> describe the_world;
ERROR 1146 (42S02): Table 'the_world.the_world' doesn't exist
mysql> describe person;
+------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+-------------+------+-----+---------+-------+
| id | int(11) | YES | | NULL | |
| age | int(11) | YES | | NULL | |
| first_name | varchar(20) | YES | | NULL | |
| last_name | varchar(20) | YES | | NULL | |
+------------+-------------+------+-----+---------+-------+
4 rows in set (0.02 sec)
mysql> insert into person values (1, 25, 'aayush', 'neupane');
Query OK, 1 row affected (0.00 sec)
mysql> insert into person values (2, 26, 'jacky', 'chan');
Query OK, 1 row affected (0.00 sec)
mysql> insert into person values (3, 27, 'aaa', 'bbb');
Query OK, 1 row affected (0.00 sec)
mysql> select * from person
-> ;
+------+------+------------+-----------+
| id | age | first_name | last_name |
+------+------+------------+-----------+
| 1 | 25 | aayush | neupane |
| 2 | 26 | jacky | chan |
| 3 | 27 | aaa | bbb |
+------+------+------------+-----------+
3 rows in set (0.00 sec)
mysql> select * from person where id < 3;
+------+------+------------+-----------+
| id | age | first_name | last_name |
+------+------+------------+-----------+
| 1 | 25 | aayush | neupane |
| 2 | 26 | jacky | chan |
+------+------+------------+-----------+
2 rows in set (0.00 sec)
mysql>
mysql> create database THE_WORLD;
Query OK, 1 row affected (0.00 sec)
mysql> select THE_WORLD;
ERROR 1054 (42S22): Unknown column 'THE_WORLD' in 'field list'
mysql> use THE_WORLD;
Database changed
mysql> create table PERSON (id int, age int, first_name varchar(20), last_name v
archar(20));
Query OK, 0 rows affected (0.02 sec)
mysql> describe the_world;
ERROR 1146 (42S02): Table 'the_world.the_world' doesn't exist
mysql> describe person;
+------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+-------------+------+-----+---------+-------+
| id | int(11) | YES | | NULL | |
| age | int(11) | YES | | NULL | |
| first_name | varchar(20) | YES | | NULL | |
| last_name | varchar(20) | YES | | NULL | |
+------------+-------------+------+-----+---------+-------+
4 rows in set (0.02 sec)
mysql> insert into person values (1, 25, 'aayush', 'neupane');
Query OK, 1 row affected (0.00 sec)
mysql> insert into person values (2, 26, 'jacky', 'chan');
Query OK, 1 row affected (0.00 sec)
mysql> insert into person values (3, 27, 'aaa', 'bbb');
Query OK, 1 row affected (0.00 sec)
mysql> select * from person
-> ;
+------+------+------------+-----------+
| id | age | first_name | last_name |
+------+------+------------+-----------+
| 1 | 25 | aayush | neupane |
| 2 | 26 | jacky | chan |
| 3 | 27 | aaa | bbb |
+------+------+------------+-----------+
3 rows in set (0.00 sec)
mysql> select * from person where id < 3;
+------+------+------------+-----------+
| id | age | first_name | last_name |
+------+------+------------+-----------+
| 1 | 25 | aayush | neupane |
| 2 | 26 | jacky | chan |
+------+------+------------+-----------+
2 rows in set (0.00 sec)
mysql>