Combine Two Tables
来源:互联网 发布:金融数据挖掘 马超群 编辑:程序博客网 时间:2024/05/22 17:12
Table: Person
+-------------+---------+| Column Name | Type |+-------------+---------+| PersonId | int || FirstName | varchar || LastName | varchar |+-------------+---------+PersonId is the primary key column for this table.
Table: Address
+-------------+---------+| Column Name | Type |+-------------+---------+| AddressId | int || PersonId | int || City | varchar || State | varchar |+-------------+---------+AddressId is the primary key column for this table.
Write a SQL query for a report that provides the following information for each person in the Person table, regardless if there is an address for each of those people:
FirstName, LastName, City, State
答案:select Person.FirstName, Person.LastName, Address.City, Address.State from Person left join Address on Person.PersonId = Address.PersonId;
0 0
- Combine Two Tables Leetcode
- Combine Two Tables
- Combine Two Tables
- Combine Two Tables
- Combine Two Tables
- Combine Two Tables
- Leetcode: Combine Two Tables
- Combine Two Tables
- [LeetCode]Combine Two Tables
- LeetCode Combine Two Tables
- Combine Two Tables
- 175. Combine Two Tables
- 175 - Combine Two Tables
- Combine Two Tables
- 【Leetcode】Combine Two Tables
- 175. Combine Two Tables
- 175. Combine Two Tables
- Combine Two Tables
- 59. Spiral Matrix II
- URAL 2067-数学
- ubuntu设置默认启动为文本界面或者图形界面
- face++实现人脸识别
- [设计模式]迭代器模式
- Combine Two Tables
- 浏览器兼容性
- CSS3——动画功能
- 01.linux系统常用配置
- Bloom Filter原理
- 一些在线编程练习或调试网站
- 环境变量配置
- 矩阵旋转算法提高75%运算
- 02.vi编辑器的使用