一、select查询语句
二、DML
update TB set TB.a = '' where TB.b='';
insert into TB(a,b) values('','');
delete from TB where TB.a = '';
merge into TB using TB2 on (TB.a = TB2.a) when matched then
update ....
when not matched then
insert ....
三、DDL
Create table TB (
a number ,
b varchar2(20),
c number,
constraints TB_A_PK primary key(a),
constraints TB_C_FK foreign key(c) references TB2(a)
);
/
create table TB2 as select * from TB;
alter table TB add (d number);
alter table TB modify (b varchar(30);
drop table TB;
truncate table TB;
四、DCL
grant create view to user;
revoke create view from user;
commit;
rollback;
savepoint;
五、约束
1.not null
2.primary key
3.foreign key
4.check
5.
六、事务
SQL语言精要
本文详细介绍SQL语言的基础操作,包括查询、插入、更新、删除等数据操纵语言(DML),创建、修改、删除表等数据定义语言(DDL),以及事务处理、权限控制等内容。适合初学者快速掌握SQL基本语法。
308

被折叠的 条评论
为什么被折叠?



