In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is to share with you about how to establish and manage tables in oracle. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
Common data types in oracle:
1) CHAR (N) or CHAR (N BYTE)
This type is used for strings of fixed length (in bytes) with a maximum length of 200 bytes
2) CHAR (N CHAR)
This type is used for fixed-length strings (in characters)
3) VARCHAR2 (N) or VARCHAR2 (N BYTE)
This type is used for strings of variable length (in bytes)
4) VARCHAR2 (N CHAR)
This type is used for strings of variable length (in characters)
5) NUMBER (PMAE S)
This type defines a variable of a numeric type, where p is the total number of digits and s is the number of digits after the decimal point
6) DATE:DD-MON-YY
Date variable
7) TIMESTAMP:DD-MON-YY HH.MI.SS AM
8) RAM (N) this type is used to define binary data, and the upper limit of n is 200.
9) large object data type: BLOB,CLOB
Pseudo column ROWID,ROWNUM
Each row has two fields that can be used to locate and plan rows.
How to modify the structure of a table:
Add columns:
Alter table table_name add column_name column_type [default defaule_value]
Modify the column definition:
Alter table table_name modify column_name column_type
Delete the column:
Alter table table_name drop column_name
Modify column names (incompatible in mysql)
Alter table table_name rename column column_name to column_new_name
Modify the table name:
Retable table_name to table_new_name
Add comments:
Add comments to the table: comment on table table_name IS "comments"
Add a comment to the line: comment on column table_name.column_name IS "comment"
Display information for the table:
USER_TABLES: stores all the table information of the current user
User_objects: stores all the database objects (tables, attempts, indexes, etc.) of the current user
User_tab_comments: comments on the tabl
User_col_comments: comments for Lin
The above is how to establish and manage tables in oracle. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.