题目1:MySQL----------Combine Two Tables
来源:互联网 发布:如何不被淘宝品控 编辑:程序博客网 时间:2024/05/21 09:56
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 FirstName,LastName,City,State from Person left join Address on Person.PersonId=Address.PersonId
考点:left join
0 0
- 题目1:MySQL----------Combine Two Tables
- 【MySQL】【leetcode】 Combine Two Tables解题报告
- LeetCode 175 -Combine Two Tables ( MYSQL )
- 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
- MYSQL配置和管理
- 攻防:文件上传漏洞的攻击与防御
- HDU1718--Rank
- HDU1181---变形课
- Java8流特性和Lambda表达式
- 题目1:MySQL----------Combine Two Tables
- HDU2304---Electrical Outlets
- mysql主从复制
- java开发多线程机制
- MySQL之旅_Day03
- poj 1486(二分图必须边)
- java .class文件详解
- C和C++的区别:
- longeset_common_profix_array(lcp_array,最长公共前缀数组,高度数组)