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;

最新文章

  1. --关于null在oracle数据库中是否参与计算,进行验证,
  2. Java基础之类Class使用
  3. regsvr32命令
  4. Linux内核启动过程start_kernel分析
  5. 更新系统没有mac dashboard 问题解决
  6. Mybatis 插入null值报错
  7. WPF解析PDF为图片
  8. 一个简单的Inno Setup例子
  9. 基于visual Studio2013解决C语言竞赛题之1093连接链表
  10. print、println与printf之间的区别
  11. matplotlib 生成 eps 插入到 tex
  12. springmvc搭配nginx 实现动静分离
  13. 查看mysql的版本号
  14. [算法专题] 深度优先搜索&回溯剪枝
  15. html5 视频和音频
  16. du 查看文件大小
  17. js 回车键事件
  18. Oracle_SQL(4) DDL 表和约束
  19. 51nod 1444 破坏道路(bfs+枚举)
  20. easyUI datetimebox 自定义显示格式

热门文章

  1. JSOI2008 小店购物
  2. ZOJ 3778 C - Talented Chef 水题
  3. javascript中各类的prototype属性
  4. HTML如何编写为桌面程序
  5. Python3 反射及常用的方法
  6. 005zabbix3.0报错记录
  7. vue单选,多选,多选的内容显示在页面可删除
  8. PHP 利用nginx的X-sendfile控制下载,提高下载效率
  9. nginx allow 多个ip & ipv4的网段表示方法解析
  10. 运行级别(run level)