当前位置:网站首页>不得不会的Oracle数据库知识点(一)
不得不会的Oracle数据库知识点(一)
2022-07-04 00:33:00 【zhulin1028】
目录
前言:
ORACLE支持五种类型的完整性约束
NOT NULL (非空)--防止NULL值进入指定的列,在单列基础上定义,默认情况下,ORACLE允许在任何列中有NULL值.
CHECK (检查)--检查在约束中指定的条件是否得到了满足.
UNIQUE (唯一)--保证在指定的列中没有重复值.在该表中每一个值或者每一组值都将是唯一的.
PRIMARY KEY (主键)--用来唯一的标识出表的每一行,并且防止出现NULL值,一个表只能有一个主键约束.
FOREIGN KEY (外部键)--通过使用公共列在表之间建立一种父子(parent-child)关系,在表上定义的外部键可以指向主键或者其他表的唯一键.ORACLE支持五种类型的完整性约束
NOT NULL (非空)--防止NULL值进入指定的列,在单列基础上定义,默认情况下,ORACLE允许在任何列中有NULL值.
CHECK (检查)--检查在约束中指定的条件是否得到了满足.
UNIQUE (唯一)--保证在指定的列中没有重复值.在该表中每一个值或者每一组值都将是唯一的.
PRIMARY KEY (主键)--用来唯一的标识出表的每一行,并且防止出现NULL值,一个表只能有一个主键约束.
POREIGN KEY (外部键)--通过使用公共列在表之间建立一种父子(parent-child)关系,在表上定义的外部键可以指向主键或者其他表的唯一键.
一.入门部分
1. 创建表空间
create tablespace schooltbs datafile ‘D:\oracle\datasource\schooltbs.dbf’ size 10M autoextend on;2. 删除表空间
drop tablespace schooltbs[including contents and datafiles];3. 查询表空间基本信息
select *||tablespace_name from DBA_TABLESPACES;4. 创建用户
create user lihua
identified by lihua
default tablespace schooltbs
temporary tablespace temp;5. 更改用户
alter user lihua
identified by 123
default tablespace users;6. 锁定用户
alter user lihua account lock|unlock;7. 删除用户
drop user lihua cascade;--删除用户模式8. oracle数据库中的角色
connect,dba,select_catalog_role,delete_catalog_role,execute_catalog_role,exp_full_database,imp_full_database,resource9. 授予连接服务器的角色
grant connect to lihua;10. 授予使用表空间的角色
grant resource to lihua with grant option;--该用户也有授权的权限11. 授予操作表的权限
grant select,insert on user_tbl to scott;--当前用户
grant delete,update on lihua.user_tbl to scott;--系统管理员12. 修改表的结构(alter)
Alter table 表名 add(列的名称,列的类型);边栏推荐
- [2021]NeRF in the Wild: Neural Radiance Fields for Unconstrained Photo Collections
- Kubedl hostnetwork: accelerating the efficiency of distributed training communication
- Report on the construction and development mode and investment mode of sponge cities in China 2022-2028
- Solve the problem that the kaggle account registration does not display the verification code
- Anomalies seen during the interview
- Regular expressions and text processors for shell programming
- A method to solve Bert long text matching
- Global and Chinese market of underwater bags 2022-2028: Research Report on technology, participants, trends, market size and share
- Yyds dry goods inventory three JS source code interpretation - getobjectbyproperty method
- Ramble 72 of redis source code
猜你喜欢
![[PHP basics] cookie basics, application case code and attack and defense](/img/7c/551b79fd5dd8a411de85c800c3a034.jpg)
[PHP basics] cookie basics, application case code and attack and defense
![[complimentary ppt] kubemeet Chengdu review: make the delivery and management of cloud native applications easier!](/img/3f/75b3125f8779e6cf9467a30fd7eeb4.jpg)
[complimentary ppt] kubemeet Chengdu review: make the delivery and management of cloud native applications easier!

Collation of the most complete Chinese naturallanguageprocessing data sets, platforms and tools

What is the future of software testing industry? Listen to the test veterans' answers
![[cloud native topic -48]:kubesphere cloud Governance - operation - overview of multi tenant concept](/img/b4/961b3b44e9ecbfd4bddd04318b663a.jpg)
[cloud native topic -48]:kubesphere cloud Governance - operation - overview of multi tenant concept

2022 system integration project management engineer examination knowledge points: software development model

Investment demand and income forecast report of China's building ceramics industry, 2022-2028

Zipper table in data warehouse (compressed storage)

Kubedl hostnetwork: accelerating the efficiency of distributed training communication

Axure resources and prototype tool Axure RP 9 download
随机推荐
[PHP basics] session basic knowledge, application case code and attack and defense
STM32 key light
Version rollback revert don't reset better reset must be forced
Global and Chinese markets for coronary artery disease treatment devices 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese markets for instant saliva testing devices 2022-2028: Research Report on technology, participants, trends, market size and share
Is the securities account opened by Caicai for individuals safe? Is there a routine
[software testing] you haven't mastered these real interview questions of big companies?
Alibaba test engineer with an annual salary of 500000 shares notes: a complete set of written tests of software testing
[C language] break and continue in switch statement
Is the account opening of Guoyuan securities really safe and reliable
SPI based on firmware library
Global and Chinese market of underwater bags 2022-2028: Research Report on technology, participants, trends, market size and share
ISBN number
It is the most difficult to teach AI to play iron fist frame by frame. Now arcade game lovers have something
Similarities and differences of text similarity between Jaccard and cosine
Pytest unit test framework: simple and easy to use parameterization and multiple operation modes
UTS | causal reasoning random intervention based on Reinforcement Learning
The upload experience version of uniapp wechat applet enters the blank page for the first time, and the page data can be seen only after it is refreshed again
Investment demand and income forecast report of China's building ceramics industry, 2022-2028
P3371 [template] single source shortest path (weakened version)