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

Oracle常用命令的列舉

數(shù)據(jù)庫 Oracle
在Oracle常用命令中有很多的命令式,就是這些的相關(guān)命令才使Oracle常用命令在實(shí)際的操作中變得更加的靈活,下面就是相關(guān)內(nèi)容的描述。

以下的文章主要是介紹Oracle常用命令,其中包括Oracle數(shù)據(jù)類型,視圖,以及實(shí)例的相關(guān)的介紹,如果你是Oracle常用命令方面的新手,相對(duì)Oracle常用命令的相關(guān)應(yīng)用方面有所了解的話,你就可以點(diǎn)擊以下的文章。

Oracle數(shù)據(jù)類型:

 

  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:

創(chuàng)建表

 

  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. )  

 

插入數(shù)據(jù)時(shí)若沒有指定hiredate,salary的話則會(huì)取默認(rèn)值

以下就是Oracle常用命令中Oracle數(shù)據(jù)字典的相關(guān)介紹:

Dba-所有方案包含的對(duì)象信息

All-用戶可以訪問的對(duì)象信息

User-用戶方案的對(duì)象信息

 

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

 

約束:

域完整性約束:not null check

實(shí)體完整性約束: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’);  

 

表間數(shù)據(jù)拷貝:

 

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

實(shí)例(創(chuàng)建表 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;  

 

查看表結(jié)構(gòu)

EDITDATA 表名;

修改表字段:

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

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

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

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

上述的相關(guān)內(nèi)容就是對(duì)Oracle常用命令的描述,希望會(huì)給你帶來一些幫助在此方面。

【編輯推薦】

  1. Oracle數(shù)據(jù)庫中的兩個(gè)進(jìn)程
  2. Oracle reports中實(shí)現(xiàn)報(bào)表的定長
  3. 執(zhí)行Oracle sql的實(shí)際步驟
  4. Oracle透明網(wǎng)關(guān)如何修改人力數(shù)據(jù)庫
  5. Oracle透明網(wǎng)關(guān)的內(nèi)容介紹
責(zé)任編輯:佚名 來源: 互聯(lián)網(wǎng)
相關(guān)推薦

2010-04-02 17:37:15

Oracle rman

2014-01-02 09:57:56

PostgreSQL命令

2011-01-19 17:00:09

Postfix常用命令

2010-04-02 17:51:10

Oracle back

2011-03-16 10:07:00

2014-07-25 10:55:36

Linux命令

2010-04-09 17:25:05

Oracle 10G

2020-09-28 15:14:31

Linux常用命令實(shí)用命令

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

2010-03-02 13:14:36

LinuxYUM常用命

2010-04-21 10:19:40

Unix Shell

2010-05-25 11:40:12

MySQL 常用命令

2013-04-28 14:03:26

Android開發(fā)Android常用命令

2010-04-01 17:19:04

CentOS常用命令

2009-12-01 18:19:41

Suse常用命令

2010-06-29 16:57:53

SNMP協(xié)議
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)

主站蜘蛛池模板: 亚洲精品福利视频 | 色综合视频 | 精品欧美一区二区三区免费观看 | av入口| 午夜播放器在线观看 | 国产a视频| 国产一区二区三区四 | 91成人免费 | 欧美激情一区二区三级高清视频 | 91中文字幕 | 久久亚洲一区二区 | 国产一区二区三区精品久久久 | 国产一区二区三区高清 | 国产精品一区二区在线 | 亚洲 中文 欧美 日韩 在线观看 | 久久久久国产精品一区二区 | .国产精品成人自产拍在线观看6 | 日韩三级免费观看 | 9久9久9久女女女九九九一九 | 日韩免费av | 看羞羞视频免费 | 日本偷偷操 | 亚洲 欧美 激情 另类 校园 | 精品视频一区二区三区四区 | 日韩图区| 四虎av电影| 久久里面有精品 | 久久久精品一区 | 日日骚av| 久久精品亚洲精品 | 久久久久国产一级毛片高清网站 | 久久成人国产 | 日韩免费三级 | 3级毛片| 日韩国产欧美 | 2018国产大陆天天弄 | 色综合一区二区三区 | www四虎com| 99色综合 | 亚洲性视频| 91精品国产一区二区三区蜜臀 |