成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

Oracle常用命令的列舉

數據庫 Oracle
在Oracle常用命令中有很多的命令式,就是這些的相關命令才使Oracle常用命令在實際的操作中變得更加的靈活,下面就是相關內容的描述。

以下的文章主要是介紹Oracle常用命令,其中包括Oracle數據類型,視圖,以及實例的相關的介紹,如果你是Oracle常用命令方面的新手,相對Oracle常用命令的相關應用方面有所了解的話,你就可以點擊以下的文章。

Oracle數據類型:

 

  1. Create table test1(name char(10),sex char(1));  
  2. Insert into test1 values(‘tomcatt北京’,’f’);  
  3. Create table test2(name nchar(10),sex nchar(1));  
  4. Insert into test2 values(‘tomcatt北京’,’男’);  

 

刪除表 drop table 表名;

 

  1. Create table test3(name varchar2(10),sex varchar2(2));  
  2. Insert into test3 values(‘tomcatt北京’,’f’);  

 

插入值過大

 

  1. Insert into test3 values(‘tomcat北京’,’f’);  
  2. Create table test4(name varchar2(10),age number(3),
    salary number(8,2));  
  3. Create table test5(name varchar2(10),birth date);  
  4. Insert into test5 values(‘Tom’,’28-2月-08’);  
  5. Insert into test5 values(‘Allen’,sysdate);   

 

DDL:

創建表

 

  1. create table scott.test6(  
  2. eid number(10),  
  3. name varchar2(20),  
  4. hiredate date default sysdate,  
  5. salary number(8,2) default 0  
  6. )  

 

插入數據時若沒有指定hiredate,salary的話則會取默認值

以下就是Oracle常用命令中Oracle數據字典的相關介紹:

Dba-所有方案包含的對象信息

All-用戶可以訪問的對象信息

User-用戶方案的對象信息

 

  1. Select * from user_tables;  
  2. Select * from all_tables;  

 

約束:

域完整性約束:not null check

實體完整性約束:unique primary key

參照完整性約束:foreign key

視圖:

 

  1. Create or replace view v1(eid,name,salary) as select 
    empno,ename,sal from emp where 
    deptno = 30

 

序列:sequence

 

  1. Create sequence mysequence1 increment by 1 start
     with 1 nomaxvalue nocycle;  
  2. Insert into test values(mysequence1.nextval,’tom’);  
  3. Create sequence student_sequence start with 1
     increment by 1;  
  4. Insert into student values
    (student_sequence.nextval,’john’);  

 

表間數據拷貝:

 

  1. Insert into dept1(id,name) select deptno,
    dname from dept; 

實例(創建表 ID字段自增):

 

  1. create table test2(id char(10) primary key not null,
     name char(10));  
  2. create sequence test2_sequence increment by 1 start
     with 1 nomaxvalue nocycle;  
  3. insert into test2 values(test2_sequence.nextval,'john');  
  4. insert into test2 values(test2_sequence.nextval,'allen');  
  5. insert into test2 values(test2_sequence.nextval,'candy');  
  6. insert into test2 values(test2_sequence.nextval,'aaaa');  
  7. insert into test2 values(test2_sequence.nextval,'bbbbb');  
  8. insert into test2 values(test2_sequence.nextval,'cccccc');  
  9. insert into test2 values(test2_sequence.nextval,'ddddd');  
  10. insert into test2 values(test2_sequence.nextval,'eeeee');  
  11. insert into test2 values(test2_sequence.nextval,'ggggg');  
  12. insert into test2 values(test2_sequence.nextval,'jowwwwhn');  
  13. insert into test2 values(test2_sequence.nextval,'aaaadd');  
  14. insert into test2 values(test2_sequence.nextval,'ggghhh');  
  15. insert into test2 values(test2_sequence.nextval,'eeettt');  
  16. insert into test2 values(test2_sequence.nextval,'wwwttt');  
  17. select * from test2;  

 

查看表結構

EDITDATA 表名;

修改表字段:

Alter table 表名 modify(字段名 類型 約束);

alter table test modify (addd varchar2(10) null);

alter table 表名 add(字段名 類型 約束);

alter table test add(age varchar2(5));

上述的相關內容就是對Oracle常用命令的描述,希望會給你帶來一些幫助在此方面。

【編輯推薦】

  1. Oracle數據庫中的兩個進程
  2. Oracle reports中實現報表的定長
  3. 執行Oracle sql的實際步驟
  4. Oracle透明網關如何修改人力數據庫
  5. Oracle透明網關的內容介紹
責任編輯:佚名 來源: 互聯網
相關推薦

2010-04-02 17:37:15

Oracle rman

2010-04-02 17:51:10

Oracle back

2011-03-16 10:07:00

2014-07-25 10:55:36

Linux命令

2011-01-19 17:00:09

Postfix常用命令

2014-01-02 09:57:56

PostgreSQL命令

2020-09-28 15:14:31

Linux常用命令實用命令

2010-04-09 17:25:05

Oracle 10G

2022-05-05 08:08:55

Podman命令Linux

2010-03-29 10:16:39

CentOS常用命令

2011-08-15 22:51:34

Oraclerman

2010-03-24 17:44:58

CentOS常用命令

2014-08-18 09:49:46

Linux

2015-07-22 17:32:22

mysql常用命令

2015-07-28 10:21:23

git命令

2009-12-22 14:47:24

Linux常用命令

2010-05-28 18:28:51

MySQL常用命令

2011-03-15 09:59:57

2010-04-01 18:10:32

CentOS常用命令

2010-04-21 10:19:40

Unix Shell
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 日韩精品一区二区三区在线观看 | 午夜精品网站 | 国产伦精品一区二区三区精品视频 | 欧美中文字幕一区二区三区亚洲 | 99久久婷婷国产综合精品电影 | 日韩精品一区二区三区在线播放 | 亚洲综合色丁香婷婷六月图片 | 亚洲影音 | 久久久久久久久久久久久久国产 | 亚洲欧美久久 | 一级黄色片日本 | 一区二区三区国产精品 | 日韩欧美高清dvd碟片 | 欧美h版| 一区二区在线免费观看视频 | 亚洲精品一区二区三区四区高清 | av在线天天| 成人久草 | 日韩中文字幕一区 | 国产小视频在线看 | 日屁网站 | 中文一区 | 综合国产 | 色综网 | 午夜一区二区三区在线观看 | 男人影音 | 久久精品一| 一区视频 | 国产高清视频在线观看 | 紧缚调教一区二区三区视频 | 欧美日产国产成人免费图片 | 日日夜夜av | 欧美精品在线一区二区三区 | 一二三四在线视频观看社区 | 日本h片在线观看 | 每日更新av | 日韩中文字幕 | 午夜资源| 亚洲色图网址 | 99久久精品国产一区二区三区 | 请别相信他免费喜剧电影在线观看 |