SQL语句

阅读 56

2022-03-11

模糊查询

select * 
fromwherelike '开头%''%结尾';

内连接

方法一

select 需要显示的列
from A表 , B表 , C表 ···
where A表的列 = B表的列 and B表的列 = C表的列 and ··· and 条件;

方法二

select 需要显示的列
from A表 
inner join B表 on A表的列 = B表的列
inner join C表 on B表的列 = C表的列 and 条件
where 条件;

去重

distinct

select distinct 需要显示的列
fromwhere 条件;

精彩评论(0)

0 0 举报