表格模板-SMSE10管理表对象 精品.ppt
《表格模板-SMSE10管理表对象 精品.ppt》由会员分享,可在线阅读,更多相关《表格模板-SMSE10管理表对象 精品.ppt(78页珍藏版)》请在第一文库网上搜索。
1、Managing Tables管理表管理表ObjectivesAfter completing this lesson, you should be able todo the following:Identify the various methods of storing dataOutline Oracle data typesDistinguish between an extended versus a restricted ROWIDOutline the structure of a rowCreate regular and temporary tablesManage sto
2、rage structures within a tableManage index-organized table,clusters and partitioned tableReorganize, truncate, drop a tableAdd, Drop or modify a column within a tableObtain table information Distribution of Rows Within a TableOracle Data TypesCHAR(N), NCHAR(N)VARCHAR2(N),NVARCHAR2(N)NUMBER(P,S)RAW(N
3、)DATETIMESTAMPBLOB, CLOB,NCLOB, BFILELONG, LONG RAWROWID, UROWIDVARRAYTABLEREFData typeBuilt-inUser-definedScalarRelationshipCollectionRepresenting Numeric DataUse the NUMBERNUMBER datatype to store real numbers in a fixed-point or floating-point format. Numbers using this datatype are guaranteed to
4、 be portable among different Oracle platforms, and offer up to 38 decimal digits of precision. Oracle 9i DateTime SupportData TypeDescriptionDateFixed at 7 bytes for each row in the table. Default format is a string (such as DD-MON-YY) TIMESTAMPVaries from 7 to 11 bytes.A value representing a date a
5、nd time, including fractional seconds. INTERVAL YEAR TO MONTHFixed at 5 bytes.Stored as an interval of years and monthsINTERVAL DAY TO SECONDFixed at 11 bytes.Stored as an interval of days to hours minutes and secondsTIMESTAMP WITH TIME ZONEFixed at 13 bytes. A value representing a date and time, pl
6、us an associated time zone setting. TIMESTAMP WITH LOCAL TIME ZONE Varies from 7 to 11 bytes.TO_DATE (November 13, 1992, MONTH DD, YYYY) TO_DATE(13-NOV-92 10:56 A.M.,DD-MON-YY HH:MI A.M. )CURRENT_DATE CURRENT_TIMESTAMPINTERVAL YEAR TO MONTH Data TypeINTERVAL YEAR TO MONTH stores a period of time usi
7、ng the YEAR and MONTH datetime fields.INTERVAL YEAR (year_precision) TO MONTHINTERVAL 123-2 YEAR(3) TO MONTHIndicates an interval of 123 years, 2 months.INTERVAL 123 YEAR(3)Indicates an interval of 123 years 0 months.INTERVAL 300 MONTH(3)Indicates an interval of 300 months.INTERVAL 123 YEARReturns a
8、n error, because the default precision is 2, and 123 has 3 digits. CREATE TABLE time_example2 (loan_duration INTERVAL YEAR (3) TO MONTH); INSERT INTO time_example2 (loan_duration) VALUES (INTERVAL 120 MONTH(3); SELECT TO_CHAR( sysdate+loan_duration, dd-mon-yyyy) FROM time_example2; -todays date is 0
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 表格模板-SMSE10管理表对象 精品 表格 模板 SMSE10 管理 对象