MySQL连接操作
文章目录
两表连接,列名冲突
表结构如下:
1 | mysql> select * from Customers; |
不使用as
改名:
1 | mysql> select Name from Customers left join orders on Customers.Id = orders.CustomerId where CustomerId is null; |
使用as
改名:
1 | mysql> select Name as Customers from Customers left join orders on Customers.Id = orders.CustomerId where CustomerId is null; |
- 本文链接:http://katherineleeyq.cn/2019/03/11/MySQL连接操作/
- 版权声明:本博客所有文章除特别声明外,均采用 CC BY-NC-SA 3.0 CN 许可协议。转载请注明出处!