DDL Data Definition Language (DDL) statements are used to define the database structure or schema. Some examples: CREATE - to create objects in the database ALTER - alters the structure of the database DROP - delete objects from the database TRUNCATE…
本文所使用的查询表来源于oracle数据中scott用户中的emp员工表和dept部门表. 一.基本语法 SQL语句的编写顺序: select 输出的列 from 表名 where 条件 group by 分组 having 分组之后的条件过滤 order by 排序; 1.伪表(dual):Oracle 对语法要求比较严格,而伪表/虚表主要用于补齐语法结构,如 select 5+5 from dual; 2.别名查询:as关键字,但可省略,如: select ename as 姓名,job 工…