您的位置:首页 > 博客中心 > 数据库 >

数据库(六)

时间:2022-03-14 02:00

连接查询 

join on  

--不容易丢失数据,条件清晰

select *from 表1

join 表2 on 连接条件

join 表3 on 连接条件

……

where 筛选条件

联合查询 

union

--连接之后,自动去重显示,列名显示的是第一个表的列名
select name,bumen from haha
union
select ceo,code from bumen

 

练习:

gxlsystem.com,布布扣

gxlsystem.com,布布扣

gxlsystem.com,布布扣

gxlsystem.com,布布扣

热门排行

今日推荐

热门手游