1.查询记录
select*from 表名 [where 条件];eg:select*from students;//查询 students 表中所有记录,所有字段的值都显示出来select field1,field2,...fieldn... from 表名 [where 条件];eg:select id,name,age from students;//查询 students 表中所有记录, 只显示…
use mydb; select * from EMP;
select * from DEPT;
select DISTINCT JOB from EMP; -- distinct 去除重复项
select MGR from EMP;
select MGR as 主管编号 from EMP; -- 辅助查询,每列信息 起别名 as
select EMPNO as 员工编号,JOB as 职位,DEPNO as 部…