1.数据定义语言(DDL):
用来创建数据库各种对象——表,视图,索引,同义词等,DDL操作是隐形提交的,不能roolback(回滚)的。
隐式提交包括:alter,comment,quit,creat,drop,rename等
2.数据操作语言(DML):
1、查询
select from where 组成的查询语句块
2、单行新增
insert into 表名 (列1,列2)/alues (值1,值2)3.多行新增
insert into 表名 (列1,列2)values (值1,值2),(值1,值2)4.删除
delete from 表名 where 删除条件5、修改
update 表名 set 更新列=更新值 where 修改条件
3查询选择(DQL)
select from where 组成的查询语句块
select top 3 列名1,列名2 from 表名
where 列名 like'%值%’ and (列名 between 小 and 大)
and 列名 in (值1,值2)
order by 列名 desc降序/asc升序
4数据控制语言(DCL)
grant(授权),rollback(回滚),commit(提交),
自动提交:把Autocommit设置成on.