摘要:
1 概念 left join (左联接):返回包括左表中的所有记录和右表中联结字段相等的记录 right join (右联接):返回包括右表中的所有记录和左表中联结字段相等的记录 inner join (等值连接):只返回两个表中联结字段相等的行 2 例子 2.1 left join select 阅读全文
摘要:
区别:where 筛选的是数据库表里原本就有的字段,而 having 筛选的是前面需要查询的字段。 (1)where 和 having 都能用: select sessionid, starttime from wc_chat_sessionlist where starttime > '2022- 阅读全文