mysql> describe test;
+-------+----------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+----------+------+-----+---------+----------------+
| id | int(11) | | PRI | NULL | auto_increment |
| title | char(10) | YES | | NULL | |
+-------+----------+------+-----+---------+----------------+
2 rows in set (0.00 sec)
mysql> select * from test;
+----+--------+
| id | title |
+----+--------+
| 1 | first |
| 2 | second |
+----+--------+
2 rows in set (0.00 sec)
mysql> select a.id, a.title, b.id, b.title from test a, test b where a.id=b.id;
+----+--------+----+--------+
| id | title | id | title |
+----+--------+----+--------+
| 1 | first | 1 | first |
| 2 | second | 2 | second |
+----+--------+----+--------+
2 rows in set (0.00 sec)
####
mysql> select a.id as a_id, a.title as a_title, b.id as b_id, b.title as b_title from test a inner join test2 b using(id);
+------+---------+------+---------+
| a_id | a_title | b_id | b_title |
+------+---------+------+---------+
| 1 | first | 1 | first |
| 2 | second | 2 | second |
+------+---------+------+---------+
2 rows in set (0.00 sec)
####
_ _ _ _
(_|| | |(_|><
_|