为了账号安全,请及时绑定邮箱和手机立即绑定
慕课网数字资源数据库体验端
Oracle数据库开发必备利器之SQL基础_学习笔记_慕课网
为了账号安全,请及时绑定邮箱和手机立即绑定

Oracle数据库开发必备利器之SQL基础

AnnyQin
难度入门
时长 4小时14分
  • 一、创建表空间 1、create table 表名;
    查看全部
  • 1、sys,system(密码是自定义的),sys权限高于system
    查看全部
  • 1。删除表结构和表数据: DROP TABLE TABLE_NAME; 2。删除表数据(高水位线):TRUNCATE TABLE TABLE_NAME;
    查看全部
  • oracle添加修改删除表字段和修改表名: 1.添加字段:alter table table_name add column_name datatype; 2.修改数据类型:alter table table_name modify column_name datatype; 3.删除字段:alter table table_name drop column column_name; 4.修改字段名:alter table table_name rename column column to new_column_name; 5.修改表名:rename table_name to new_table_name;
    查看全部
  • ORACLE创建表: create table table_name(column_name datatype[size],...); exp. create table userinfo(id number(6,0), username varchar2(20), password varchar2(20), email varchar2(30), regdate date);
    查看全部
    0 采集 收起 来源:Oracle管理表

    2015-09-03

  • ORACLE 表中的数据类型: 1、字符型(员工的姓名,爱好等) CHAR(n)MAX2000自动补齐后面的空格、NCHAR(n)MAX1000 VARCHAR2(n)MAX4000可变长度不用补齐后面的空格、NVARCHAR2(n)MAX2000 2、数值型(年龄、工资整数和小数) NUMBER(p有效数字,s小数点后的位数) NUMBER(5,2)有效数字5位,只留2位小数,如123.45 FLOAT(n)存储二进制的位数 3、日期型 DATE DATE类型表示范围:公元前4712年1月1日到公元9999年12月31日,可以精确到秒 TIMESTAMP时间戳类型,精确到小数秒 4、其它类型(大对像) BLOB 4G的数据,以二进制 CLOB 也可以存放4GB的数据,以字符串
    查看全部
  • oracle数据表: 二维结构(列[数据类型]*行[数据内容])
    查看全部
  • oracle删除表空间: drop tablespace tablespace_name[including contents]; drop tablespace cux; --删除表空间,不包括数据文件 drop tablespace cux including contents; --删除表空间和数据文件
    查看全部
  • oracle删除数据文件(不能删除第1个创建的数据文件): create tablespace cux datafile 'cuxtp001.dbf' size 10m; --第1个数据文件不能删除。 create tablespace cux datafile 'cuxtp002.dbf' size 20m; alter tablespace cux drop datafile 'cuxtp002.dbf'; select file_name from dba_data_files where tablespace_name='CUX';
    查看全部
  • oracle在原来表空间上增加数据文件: alter tablespace tablespace_name add datafile 'xxx.dbf' size xx; alter tablespace cux add datafile 'cuxtp002.dbf' size 20m; select file_name from dba_data_files where tablespace_name='CUX';
    查看全部
  • oracle修改表空间状态: alter tablespace tablespace_name online; (只能在线状态才能改变只读|读写状态) alter tablespace tablespace_name read only|read write; alter tablespace cux read only; oracle查看表空间状态: select status from dba_tablespaces where tablespace_name='CUX';
    查看全部
  • oracle修改表空间状态: alter tablespace tablespace_name online|offline; exp. alter tablespace cux offline; oracle查看表空间状态: select status from dba_tablespaces where tablespace_name='CUX';
    查看全部
  • search tablespace path. select file_name from dba_data_files where tablespace_name='CUX'; select file_name from dba_temp_files where tablespace_name='CUXTMP';
    查看全部
  • create temporary tablespace exp. create temporary tablespace cuxtmp tempfile 'cuxtmptp001.dbf' size 10m;
    查看全部
  • create tablespace exp. create tablespace cux datafile 'cuxtp001.dbf' size 10m;
    查看全部

举报

0/150
提交
取消
课程须知
只要知道数据库是什么就可以来学习本课程呦!
老师告诉你能学到什么?
掌握Oracle的SQL语句基础,为后续的课程学习打好基础。
友情提示:

您好,此课程属于迁移课程,您已购买该课程,无需重复购买,感谢您对慕课网的支持!