码迷,mamicode.com
首页 > 数据库 > 详细

sql 基础--mysql 5 (7)

时间:2015-02-26 13:09:14      阅读:240      评论:0      收藏:0      [点我收藏+]

标签:

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)

 

sql 基础--mysql 5 (7)

标签:

原文地址:http://www.cnblogs.com/wjw334/p/4300945.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!