当前位置:网站首页>Oracle database knowledge points (I)
Oracle database knowledge points (I)
2022-07-04 00:41:00 【zhulin1028】
Catalog
Preface :
ORACLE Five types of integrity constraints are supported
NOT NULL ( Non empty )-- prevent NULL Value into the specified column , Define... On a single column basis , By default ,ORACLE Allow... In any column NULL value .
CHECK ( Check )-- Check whether the conditions specified in the constraint are met .
UNIQUE ( only )-- Ensure that there are no duplicate values in the specified column . Each value or group of values in the table will be unique .
PRIMARY KEY ( Primary key )-- Used to uniquely identify each row of the table , And prevent NULL value , A table can only have one primary key constraint .
FOREIGN KEY ( External key )-- Establish a parent-child relationship between tables by using common columns (parent-child) Relationship , The external key defined on the table can point to the primary key or the unique key of other tables .ORACLE Five types of integrity constraints are supported
NOT NULL ( Non empty )-- prevent NULL Value into the specified column , Define... On a single column basis , By default ,ORACLE Allow... In any column NULL value .
CHECK ( Check )-- Check whether the conditions specified in the constraint are met .
UNIQUE ( only )-- Ensure that there are no duplicate values in the specified column . Each value or group of values in the table will be unique .
PRIMARY KEY ( Primary key )-- Used to uniquely identify each row of the table , And prevent NULL value , A table can only have one primary key constraint .
POREIGN KEY ( External key )-- Establish a parent-child relationship between tables by using common columns (parent-child) Relationship , The external key defined on the table can point to the primary key or the unique key of other tables .
One . Introduction part
1. Create tablespace
create tablespace schooltbs datafile ‘D:\oracle\datasource\schooltbs.dbf’ size 10M autoextend on;2. Delete tablespace
drop tablespace schooltbs[including contents and datafiles];3. Query the basic information of table space
select *||tablespace_name from DBA_TABLESPACES;4. Create user
create user lihua
identified by lihua
default tablespace schooltbs
temporary tablespace temp;5. Change user
alter user lihua
identified by 123
default tablespace users;6. Lock the user
alter user lihua account lock|unlock;7. Delete user
drop user lihua cascade;-- Delete user mode 8. oracle Roles in the database
connect,dba,select_catalog_role,delete_catalog_role,execute_catalog_role,exp_full_database,imp_full_database,resource9. Grant the role of connecting to the server
grant connect to lihua;10. Grant roles that use tablespaces
grant resource to lihua with grant option;-- The user also has authorized permission 11. Grant permissions to the operation table
grant select,insert on user_tbl to scott;-- The current user
grant delete,update on lihua.user_tbl to scott;-- System administrator 12. Modify the structure of the table (alter)
Alter table Table name add( Column name , The type of the column );边栏推荐
- Release and visualization of related data
- What are the application fields of digital twins in industry?
- Optimization of for loop
- [GNN] hard core! This paper combs the classical graph network model
- Swagger2 quick start and use
- [PHP basics] cookie basics, application case code and attack and defense
- What is the future of software testing industry? Listen to the test veterans' answers
- 查询效率提升10倍!3种优化方案,帮你解决MySQL深分页问题
- The first training of wechat applet
- Generic
猜你喜欢

Bodong medical sprint Hong Kong stocks: a 9-month loss of 200million Hillhouse and Philips are shareholders

功能:求出菲波那契数列的前一项与后一项之比的极限的 近似值。例如:当误差为0.0001时,函数值为0.618056。

(Introduction to database system | Wang Shan) Chapter V database integrity: Exercises

The difference between objects and objects

BBS forum recommendation
![[NLP] text classification still stays at Bert? Duality is too strong than learning framework](/img/49/1ff6025bdb0445e5638c1451e0b267.jpg)
[NLP] text classification still stays at Bert? Duality is too strong than learning framework

A dichotomy of Valentine's Day

手机异步发送短信验证码解决方案-Celery+redis
![[complimentary ppt] kubemeet Chengdu review: make the delivery and management of cloud native applications easier!](/img/28/fc05f2e8d53cf81fd061c799090022.jpg)
[complimentary ppt] kubemeet Chengdu review: make the delivery and management of cloud native applications easier!
![[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
随机推荐
7.1 学习内容
From functools import reduce -- see the use of reduce function from typical examples
[CSDN Q & A] experience and suggestions
PMP 考试常见工具与技术点总结
Global and Chinese market of melting furnaces 2022-2028: Research Report on technology, participants, trends, market size and share
功能:编写函数fun求s=1^k+2^k +3^k + ......+N^k的值, (1的K次方到N的K次方的累加和)。
For loop
国元证券开户是真的安全可靠吗
Pytest unit test framework: simple and easy to use parameterization and multiple operation modes
2-redis architecture design to use scenarios - four deployment and operation modes (Part 2)
What insurance products should be bought for the elderly?
1-redis architecture design to use scenarios - four deployment and operation modes (Part 1)
[PHP basics] cookie basics, application case code and attack and defense
12. Go implementation of integer to Roman numeral and leetcode
STM32 key light
删除所有值为y的元素。数组元素中的值和y的值由主函数通过键盘输入。
Struct in linked list
A-Frame虚拟现实开发入门
Cannot build artifact 'test Web: War expanded' because it is included into a circular depend solution
The FISCO bcos console calls the contract and reports an error does not exist