Select

  1. # select 字段1... from 表名
  2. select 'a' + 'c', 3 * 2;
  3. select 1 + 4
  4. from dual; #dual 伪表
  5. # * 表中所有的字段
  6. select *
  7. from test;

列的别名

可以使用字段 as 别名 或者字段 别名 方式

列的别名可以使用一对””引起来 不建议使用单引号

select去重

  1. select distinct id 部门id
  2. from test;