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

Oracle常用的命令中Oracl的相關數據類型列舉

數據庫 Oracle
Oracle常用的命令中Oracl的相關數據類型有很多種,本文主要向你介紹的是經常使用到的一些類型,例如,Oracle常用命令數據字典就是經常被使用到的。

以下的文章主要是介紹Oracle常用的命令中Oracl的相關數據類型,本文也涉及到一些相關的實際應用代碼,以代碼的方式來引出Oracle常用的命令中Oracl的相關數據類型,以下就是文章的具體介紹。

 

  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);  
  6. 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常用命令數據字典:

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’);  

 

Oracle常用命令表間數據拷貝:

 

  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(字段名 類型 約束);

 

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

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

 

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

【編輯推薦】

  1. Oracle應用的程序開發趨于向Web的緣由
  2. Oracle RAC中錯誤觀點出現的原因
  3. Oracle客戶關系管理論壇的內容簡介
  4. Oracle常用命令的列舉
  5. Oracle常用的命令如何查看表的結構
責任編輯:佚名 來源: 博客園
相關推薦

2010-04-07 11:21:28

Oracle常用命令

2010-04-23 14:08:11

Oracle數據類型

2010-04-27 11:03:39

Oracle Java

2010-07-26 14:21:25

SQL Server數

2010-07-20 15:54:02

SQL Server數

2010-08-26 17:16:19

Infobright

2010-04-13 15:24:25

Oracle維護常用語

2010-10-27 14:52:04

ORACLE數據類型

2010-06-10 10:06:01

MySQL數據類型

2010-03-31 18:56:56

Oracle 數據類型

2022-07-03 06:10:15

MySQL數據庫

2010-05-31 10:35:12

MySQL數據類型

2010-04-08 14:23:14

Oracle服務

2010-10-19 15:54:38

sql server創

2011-08-24 13:23:35

Access 2010

2010-03-30 16:33:55

Oracle數據類型

2009-11-17 10:01:11

Oracle數據類型

2022-10-27 20:42:04

JavaScripJava編程語言

2010-08-25 13:36:53

DB2Oracle

2025-01-06 05:10:00

Python數據類型編程
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 久久精品在线免费视频 | 小h片免费观看久久久久 | 久久黄色网 | 欧美激情五月 | 久久69精品久久久久久国产越南 | 日本精品一区二区三区四区 | 国产精品美女久久久久久免费 | 在线精品一区 | 在线成人www免费观看视频 | 婷婷激情在线 | 最新日韩欧美 | 欧美成人a∨高清免费观看 91伊人 | 久久在线| 91视频亚洲 | 91就要激情 | 日韩在线免费观看视频 | 亚洲国产成人av好男人在线观看 | 国产精品美女 | 人妖videosex高潮另类 | 成人精品国产一区二区4080 | 夜夜操天天操 | 午夜影院在线观看 | 国产精品视频播放 | 国产精品久久久久久久久久不蜜臀 | 欧美国产91 | 亚洲九九色 | 国产一区二区三区四区 | 亚洲精品久久久一区二区三区 | 久久久久久影院 | 中文字幕精品视频在线观看 | 亚洲人精品午夜 | 欧美成年人网站 | 成人日韩av | 日韩精品久久久 | 精品在线一区二区三区 | 成人av一区 | 日韩成人一区 | 国产精品久久久久久久久久久免费看 | 在线欧美亚洲 | 欧美日韩视频在线第一区 | 精品日韩一区二区 |