sql 基础--mysql 5 (7)

14.高级联结表

  使用别名

mysql> select uid as u,name as n,msg as m from pw_luck;
+----+-----------+------+
| u  | n         | m    |
+----+-----------+------+
|  0 | Wilson    |  100 |
|  1 | zhangsan  |  100 |
|  2 | lisi      | 1001 |
|  3 | wang5     | 1001 |
|  7 | zhangsan7 | 1000 |
|  8 | zhangsan8 | 1000 |
|  9 | zhangsan9 | 1000 |
| 10 | wang5     | 1000 |
| 11 | wang5%    | 2000 |
| 12 | WANG5     | 1000 |
| 13 | wang5     |  100 |
| 14 | wang5     |  100 |
| 15 | zhangsan7 | 1000 |
| 16 | zhangsan7 | 1002 |
| 17 | zhangsan7 | 1002 |
+----+-----------+------+
15 rows in set (0.03 sec)

 

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。