一.sql语法 select */列名1,列名2... from 表名[连接查询 内连接/左连接 on条件] 必选的 where 条件 子查询/in/exists/between ... and .. 可选的 group by 分组列1,分组列2... 可选的 having 字句 可以对分组结果进行筛选 可选的 order by 排序列1,排序列2... 可选的 各个关键字的数据必须要保证 二.写sql语句的步骤 1.要先确定从哪个表中查询数据,是要从一个表查询,还是要从多个表查询,如果是多个表…