lucheng918的个人博客分享 http://blog.sciencenet.cn/u/lucheng918

博文

SQL of Oracle

已有 2413 次阅读 2014-2-17 22:18 |个人分类:linux+oracle|系统分类:科研笔记| sql

DDL:数据定义语言

create drop truncate alter

DCL:数据控制语言

grant revoke

DML:数据操作语言

delete update insert


INSERT增加新行,INSERT INTO table[column...] VALUES (value...);


-

增加主键

 

    alter table

表名

add constraint

主键名

primary key (

字段名

1);

-

增加外键

:

    alter table

表名

 

      add constraint

外键名

foreign key (

字段名

1)

        references

关联表

(

字段名

2);

增加主键

    alter table 表名 add constraint 主键名 primary key (字段名1);

增加外键:

    alter table 表名

      add constraint 外键名 foreign key (字段名1)  references 关联表 (字段名2);


select for update??



https://blog.sciencenet.cn/blog-780964-768406.html

上一篇:linux sed总结
下一篇:java 连接 mongo
收藏 IP: 168.160.22.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-10-20 01:32

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部