-
sys、system、sysman、scott 四个用户查看全部
-
主键约束(设置主键约束后自动变为非空) 查看约束的名字 desc user_constrain 查询表的主键名字和状态 select constrain_name,status from user_constrain where table_name="表名" 1.创建表的时候 数据类型+primary key constraint(强制,限制,约束) constraint_name primary key(column...) 2.(1)修改表的时候设置主键约束 alter table table_name add constraint constraint_name primary key(cloumn...); (2)修改主键的名字alter table table_name rename constraint old_name to new (3)删除主键约束alter table table_name disable(禁用)/enable(启用) contraint contraint_name (彻底删除)alter table table_name drop constraint constriant_name (彻底删除) alter table table_name drop primary key[cascade(外键)]查看全部
-
2.(1)修改表的时候设置主键约束 alter table table_name add constraint constrain_name primary key(cloumn...); (2)修改主键的名字alter table table_name rename constraint old_name to new (3)删除主键约束 disable(禁用)/enable(启用) contraint contraint_name查看全部
-
创建表同时复制表中数据: create new_table as select column.../* from old_table 插入数据是复制表中数据: insert into new_table(column) select ../* from ole_table查看全部
-
// 创建永久表空间 (1)create tablespace test1_tablespace datafile 'test1file.dbf' size 10m; // 创建临时表空间 (2)create temporary tablespace temptest1_tablespace tempfile 'tempfile1.dbf' size 10m; 注意:注意两处的区别!!!查看全部
-
CREATE [TEMPORARY] TABLESPACE tablespace_name TEMPFILE|DATAFILE 'xx.dbf' SIZE xx (1)如果不设置路径会默认存放到oreacle默认的安装目录下 (2)在不知道默认路径的情况下查看表空间: 语句: desc dba_data_files (3)查看永久表空间的语句: select file_name from dba_data_files where tablespace_name='需要大写' (4)查看临时表空间的语句: select file_name from dba_temp_files where tablespace_name='TEMP需要大写'查看全部
-
在Oracle数据库安装完成后,system用户默认的临时表空间和临时表空间分别是:system和temp查看全部
-
(1)desc dba_tablespace; (2)select tablespace_name from dba_tablespaces; (3)desc user_tablespaces; // 普通用户表空间 (4)select tablespace_name from user_tablespaces; (5)select default_tablespace,temporary_tablespace from dba_users where username='SYSTEM'; (11)dba_tablespaces / user_tablespaces 数据字典 (22)dba_users / user_users 数据字典 (33)设置用户的默认或临时表空间 ALTER USER username DEFAULT | TEMPORARY TABLESPACE tablespace_name; ALTER USER system DEFAULT TABLESPACE system; // 更改默认表空间为system查看全部
-
表空间的分类: (1)永久表空间 (2)临时表空间(中间执行过程) (3)UNDO表空间查看全部
-
在sys,system,sysman,scott四个用户权限中,scott用户最低。查看全部
-
(1)启用用户的语句 alter user username account unlock 例子对scott用户解锁 alter user scott account unlock; (2)使用scott用户登录SQL Plus connect scott/tiger;查看全部
-
case when使用3查看全部
-
case when 的使用2查看全部
-
case when的使用查看全部
-
case....when语句的使用查看全部
举报
0/150
提交
取消