【SQL】175. Combine Two Tables
2024-08-30 17:54:08
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:
SELECT FirstName,LastName,City,State
FROM Person LEFT OUTER JOIN Address
ON Person.PersonId=Address.PersonId;
最新文章
- --关于null在oracle数据库中是否参与计算,进行验证,
- Java基础之类Class使用
- regsvr32命令
- Linux内核启动过程start_kernel分析
- 更新系统没有mac dashboard 问题解决
- Mybatis 插入null值报错
- WPF解析PDF为图片
- 一个简单的Inno Setup例子
- 基于visual Studio2013解决C语言竞赛题之1093连接链表
- print、println与printf之间的区别
- matplotlib 生成 eps 插入到 tex
- springmvc搭配nginx 实现动静分离
- 查看mysql的版本号
- [算法专题] 深度优先搜索&;回溯剪枝
- html5 视频和音频
- du 查看文件大小
- js 回车键事件
- Oracle_SQL(4) DDL 表和约束
- 51nod 1444 破坏道路(bfs+枚举)
- easyUI datetimebox 自定义显示格式