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)06/01 Report--
Represents the very important data objects in the oracle database, but also the main objects, today, start to learn the management of tables! 1: data type of the table 1: character type CHAR: string of fixed character length (fast query) vachar2: variable length string field (save space) 2: numeric type number (5Magne2) The following decimal 3: date type DATE default format is determined by the NLS_DATE_FORMAT parameter 4:LOB type BLOB: store music, video, images and other binary files CLOB: character format large object 5:ROWID data type pseudo column type, physical address for storing data records 2: table operation 1: create table CREATE TABLE TABLE_NAME (ID NUMBER (10) NOT NULL....) Learn from a table CREATE TABLE TABLE_NAME AS SELECT * FROM TABLE_NAME1;2: add field ALTER TABLE TABLE_NAME ADD (ID NUMBER (10)); 3: delete field ALTER TABLE TABLE_NAME DROP (NAME1,NAME2); 4: modify field ALTER TABLE TABLE_NAME MODIFY CLOUMN_NAME CLOUMN_PROPERTY5: rename table ALTER TABLE TABLE_OLD_NAME TO NEW_NAME;6: change tablespace and storage parameter ALTER TABLE TABLE_NAME MOVE TABLESPACE TABLESPACE_NAME ALTER TABLE TABLE_NAME PCTFREE 25 PCTUSED 45 set table free space usage 7: delete table DROP TABLE TABLE_ name [cascade CONSTRAINTS] (if there is a constraint on the table, you must add the following parameters) 8: modify the table status to set the read only alter table table_name read only; query status select table_name,read_only from user_table where table_name='table_name' 3: table parameter 1: storage parameter STORAGE (INITIAL 256K) set when creating the table (if you know how big the table is, you can set the size first to avoid fragmentation) IV: table integrity and constraint not null non-empty constraint BOOK_PK primary key (BOOK) the primary key constraint name for creating the BOOK field is BOOK_PKalter table table_name drop book_pk Delete the primary key UNIQUE uniqueness constraint allows the null foreign key constraint foreign key name foreign key (name_id) references table_name2 (column) Disable constraint alter table table_name disable constraint constraint name Delete constraint alter table table_name drop constraint constraint name
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.