当前位置:网站首页>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,resource
9. 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 );
边栏推荐
- 手机异步发送短信验证码解决方案-Celery+redis
- Bodong medical sprint Hong Kong stocks: a 9-month loss of 200million Hillhouse and Philips are shareholders
- 功能:求出菲波那契数列的前一项与后一项之比的极限的 近似值。例如:当误差为0.0001时,函数值为0.618056。
- Is the low commission link on the internet safe? How to open an account for China Merchants Securities?
- Global and Chinese markets for coronary artery disease treatment devices 2022-2028: Research Report on technology, participants, trends, market size and share
- AI Challenger 2018 text mining competition related solutions and code summary
- 2022 Software Test Engineer skill list, please check
- 国元证券开户是真的安全可靠吗
- What are the application fields of digital twins in industry?
- Qtcharts notes (V) scatter diagram qscatterseries
猜你喜欢
功能:求出菲波那契数列的前一项与后一项之比的极限的 近似值。例如:当误差为0.0001时,函数值为0.618056。
ESP Arduino playing with peripherals (V) basic concept of interrupt and timer interrupt
Similarities and differences of text similarity between Jaccard and cosine
A Kuan food rushed to the Shenzhen Stock Exchange: with annual sales of 1.1 billion, Hillhouse and Maotai CCB are shareholders
Interview script of Software Test Engineer
Weekly open source project recommendation plan
Sequence list and linked list
Entropy and full connection layer
What is regression testing? Talk about regression testing in the eyes of Ali Test Engineers
Celebrate the new year | Suihua fire rescue detachment has wonderful cultural activities during the Spring Festival
随机推荐
Cannot build artifact 'test Web: War expanded' because it is included into a circular depend solution
What are the application fields of digital twins in industry?
Function: find the approximate value of the limit of the ratio of the former term to the latter term of Fibonacci sequence. For example, when the error is 0.0001, the function value is 0.618056.
It's OK to have hands-on 8 - project construction details 3-jenkins' parametric construction
What insurance products should be bought for the elderly?
功能:将主函数中输入的字符串反序存放。例如:输入字符串“abcdefg”,则应输出“gfedcba”。
Severity code description the project file line prohibits the display of status error c4996 fopen ('fscanf ', StrCmp): this function or variable may be unsafe The most comprehensive solution
【leetcode】300. Longest increasing subsequence (dynamic programming, dichotomy)
Global and Chinese markets for coronary artery disease treatment devices 2022-2028: Research Report on technology, participants, trends, market size and share
手机异步发送短信验证码解决方案-Celery+redis
Cloud dial test helps Weidong cloud education to comprehensively improve the global user experience
[software testing] you haven't mastered these real interview questions of big companies?
Pair
CSP window
基于.NetCore开发博客项目 StarBlog - (14) 实现主题切换功能
查询效率提升10倍!3种优化方案,帮你解决MySQL深分页问题
Recommendation of knowledge base management system
Unity Shader入门精要读书笔记 第三章 Unity Shader基础
Global and Chinese markets for blood and liquid heating devices 2022-2028: Research Report on technology, participants, trends, market size and share
What is the GPM scheduler for go?