2 Star 8 Fork 41

19级软件1班 / 力扣刷题

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
从不订单的客户.sql 473 Bytes
一键复制 编辑 原始数据 按行查看 历史
姚振鑫 提交于 2020-05-12 10:37 . sql
Create table Customers
(Id int primary key identity(1,1) not null,
Name varchar(255) not null,
)
Create table Orders
(
Id int primary key identity(1,1) not null,
CustomerId int not null references Customers(Id) ,
)
insert into Customers(Name) values('joe'),('Henry'),('Sam'),('Max')
insert into Orders(CustomerId) values(3),(1)
select Name from Customers
select Name as Customers from Customers a left join Orders b on b.CustomerId=a.Id where b.CustomerId Is Null
SQL
1
https://gitee.com/grade19_soft_class1/leet_code_sql.git
git@gitee.com:grade19_soft_class1/leet_code_sql.git
grade19_soft_class1
leet_code_sql
力扣刷题
master

搜索帮助