oracleÖ§³ÖµÄÊý¾ÝÀàÐÍ
³£ÓõÄÊý¾Ý¿â×Ö¶ÎÀàÐÍÈçÏ£º
×Ö¶ÎÀàÐÍ ÖÐÎÄ˵Ã÷ ÏÞÖÆÌõ¼þ ÆäËü˵Ã÷
CHAR ¹Ì¶¨³¤¶È×Ö·û´® ×î´ó³¤¶È2000 bytes
VARCHAR2 ¿É±ä³¤¶ÈµÄ×Ö·û´® ×î´ó³¤¶È4000 bytes ¿É×öË÷ÒýµÄ×î´ó³¤¶È749
NCHAR ¸ù¾Ý×Ö·û¼¯¶ø¶¨µÄ¹Ì¶¨³¤¶È×Ö·û´® ×î´ó³¤¶È2000 bytes
NVARCHAR2 ¸ù¾Ý×Ö·û¼¯¶ø¶¨µÄ¿É±ä³¤¶È×Ö·û´® ×î´ó³¤¶È4000 bytes
DATE ÈÕÆÚ£¨ÈÕ-ÔÂ-Ä꣩ DD-MM-YY£¨HH-MI-SS£© ¾¹ýÑϸñ²âÊÔ£¬ÎÞǧ³æÎÊÌâ
LONG ³¬³¤×Ö·û´® ×î´ó³¤¶È2G£¨231-1£© ×ã¹»´æ´¢´ó²¿Í·Öø×÷
RAW ¹Ì¶¨³¤¶ÈµÄ¶þ½øÖÆÊý¾Ý ×î´ó³¤¶È2000 bytes ¿É´æ·Å¶àýÌåͼÏóÉùÒôµÈ
LONG RAW ¿É±ä³¤¶ÈµÄ¶þ½øÖÆÊý¾Ý ×î´ó³¤¶È2G ͬÉÏ
BLOB ¶þ½øÖÆÊý¾Ý ×î´ó³¤¶È4G
CLOB ×Ö·ûÊý¾Ý ×î´ó³¤¶È4G
NCLOB ¸ù¾Ý×Ö·û¼¯¶ø¶¨µÄ×Ö·ûÊý¾Ý ×î´ó³¤¶È4G
BFILE ´æ·ÅÔÚÊý¾Ý¿âÍâµÄ¶þ½øÖÆÊý¾Ý ×î´ó³¤¶È4G
ROWID Êý¾Ý±íÖмǼµÄΨһÐкŠ10 bytes ********.****.****¸ñʽ£¬*Ϊ0»ò1
NROWID ¶þ½øÖÆÊý¾Ý±íÖмǼµÄΨһÐкŠ×î´ó³¤¶È4000 bytes
NUMBER(P,S) Êý×ÖÀàÐÍ PΪÕûÊý룬SΪСÊýλ
DECIMAL(P,S) Êý×ÖÀàÐÍ PΪÕûÊý룬SΪСÊýλ
INTEGER ÕûÊýÀàÐÍ Ð¡µÄÕûÊý
FLOAT ¸¡µãÊýÀàÐÍ NUMBER(38)£¬Ë«¾«¶È
REAL ʵÊýÀàÐÍ NUMBER(63)£¬¾«¶È¸ü¸ß
Êý¾ÝÀàÐÍ ²ÎÊý ÃèÊö
char(n) n=1 to 2000×Ö½Ú ¶¨³¤×Ö·û´®£¬n×Ö½Ú³¤£¬Èç¹û²»Ö¸¶¨³¤¶È£¬È±Ê¡Îª1¸ö×Ö½Ú³¤£¨Ò»¸öºº×ÖΪ2×Ö½Ú£©
varchar2(n) n=1 to 4000×Ö½Ú ¿É±ä³¤µÄ×Ö·û´®£¬¾ßÌ嶨ÒåʱָÃ÷×î´ó³¤¶Èn£¬ÕâÖÖÊý¾ÝÀàÐÍ¿ÉÒÔ·ÅÊý×Ö¡¢×ÖĸÒÔ¼°ASCIIÂë×Ö·û¼¯(»òÕßEBCDICµÈÊý¾Ý¿âϵͳ½ÓÊܵÄ×Ö·û¼¯±ê×¼)ÖеÄËùÓзûºÅ¡£
Èç¹ûÊý¾Ý³¤¶ÈûÓдﵽ×î´óÖµn£¬Oracle 8i»á¸ù¾ÝÊý¾Ý´óС×Ô¶¯µ÷½Ú×ֶγ¤¶È£¬Èç¹ûÄãµÄÊý¾ÝÇ°ºóÓпոñ£¬Oracle 8i»á×Ô¶¯½«Æäɾȥ¡£VARCHAR2ÊÇ×î³£ÓõÄÊý¾ÝÀàÐÍ¡£¿É×öË÷ÒýµÄ×î´ó³¤¶È3209¡£
number(m,n) m=1 to 38
n=-84 to 127 ¿É±ä³¤µÄÊýÖµÁУ¬ÔÊÐí0¡¢ÕýÖµ¼°¸ºÖµ£¬mÊÇËùÓÐÓÐЧÊý×ÖµÄλÊý£¬nÊÇСÊýµãÒÔºóµÄλÊý¡£
È磺number(5,2)£¬ÔòÕâ¸ö×ֶεÄ×î´óÖµÊÇ99,999£¬Èç¹ûÊýÖµ³¬³öÁËλÊýÏÞÖƾͻᱻ½ØÈ¡¶àÓàµÄλÊý¡£
È磺number(5,2)£¬µ«ÔÚÒ»ÐÐÊý¾ÝÖеÄÕâ¸ö×Ö¶ÎÊäÈë575.316£¬ÔòÕæÕý±£´æµ½×Ö¶ÎÖеÄÊýÖµÊÇ575.32¡£
È磺number(3,0)£¬ÊäÈë575.316£¬ÕæÕý±£´æµÄÊý¾ÝÊÇ575¡£
date ÎÞ ´Ó¹«ÔªÇ°4712Äê1ÔÂ1ÈÕµ½¹«Ôª4712Äê12ÔÂ31ÈÕµÄËùÓкϷ¨ÈÕÆÚ£¬Oracle 8iÆäʵÔÚÄÚ²¿ÊÇ°´7¸ö×Ö½ÚÀ´±£´æÈÕÆÚÊý¾Ý£¬ÔÚ¶¨ÒåÖл¹°üÀ¨Ð¡Ê±¡¢·Ö¡¢Ãë¡£
ȱʡ¸ñʽΪDD-MON-YY£¬Èç07-11ÔÂ-00 ±íʾ2000Äê11ÔÂ7ÈÕ
Ïà¹ØÎĵµ£º
ѧϰOracle DBAÒ²°ë¸ö¶àѧÆÚÁË£¬½ñÌìÃÍÈ»²Å·¢ÏÖ£¬ÔÀ´ÎÒµÄÊ黹ÊǺÜеģ¬ÉϿβÙ×÷ʱºòÒ²Ö»ÊÇÖªµÀ´ó¸ÅÔõô×ö£¬µ«ÊÇÒªÕæµÄÈ«²¿×Ô¼º×ö£¬¶ø²»È¥·Ê黹ÊÇÓÐÒ»¶¨µÄÄѶȵģ¬ËùÒÔÄØ£¬½ñÌ쿪ʼ½«DBA´ÓÍ·¸´Ï°Ò»±é£¬Í¬Ê±ÔÙ²Ù×÷Ò»±é¡£
µÚÒ»Õ£¬Ñ§µÄÊÇOracleµÄÌåϵ½á¹¹£ ......
ÎÊÌ⣺Êý¾Ý¿âΪ£ºOracle Database 10g Release 2
¡¡¡¡²Ù×÷ϵͳΪ£ºWindows Vista/Windows XP MCE(Á½¸ö²Ù×÷ϵͳ·Ö±ð°²×°ºó³öÏÖÏàͬÎÊÌâ)
¡¡¡¡Êý¾Ý¿â°²×°ºó(һ·ĬÈÏÖµ)£¬³¢ÊÔInsertÊý¾ÝºóSelect³öÀ´£¬ÔÀ´µÄÖÐÎÄ×Ö¶ÎÖµ±ä³ÉÁË??????ÐÎʽµÄÂÒÂ룬¸ÃÈçºÎ½â¾ö£¿
¡¡¡¡ÔÚÍøÉϲéÁËһЩ×ÊÁÏ£¬ËµÊÇ·þÎñÆ÷Óë¿Í»§¶Ë×Ö·û¼¯²»Æ¥Å䣬µ«Î ......
ÎÒÃÇÔÚ´´½¨±í½á¹¹µÄ¹ý³ÌÖУ¬¿ÉÄÜ»áÓÉÓÚʧÎó£¬Ôì³É±íÖÐÁÐÃû´íÎó£¬ÈçºÎ¸ü¸ÄÄØ£¬Äã¿ÉÄÜ»á»Ø´ð£¬Ê¹ÓÃOEM»òÕßPL/SQL£¬³ýÁËÕâÁ½ÖÖ·½·¨£¬ÎÒÃÇ¿ÉÒÔʹÓÃÃüÁ
ALTER TABLE ±íÃû rename column ÁÐÃû to ÐÂÁÐÃû ×¢ÒâcolumnÊǹؼü×Ö /*ÖØÃüÃûÁÐÃû*/
ALTE ......
1.»ù±¾½á¹¹
CREATE OR REPLACE PROCEDURE ´æ´¢¹ý³ÌÃû×Ö
(
²ÎÊý1 IN NUMBER,
²ÎÊý2 IN NUMBER
) IS
±äÁ¿1 INTEGER :=0;
±äÁ¿2 DATE;
BEGIN
END ´æ´¢¹ý³ÌÃû×Ö
2.SELECT INTO STATEMENT
½«select²éѯµÄ½á¹û´æÈëµ½±äÁ¿ÖУ¬¿ÉÒÔͬʱ½«¶à¸öÁд洢¶à¸ö±äÁ¿ÖУ¬±ØÐëÓÐÒ»Ì ......
Êý¾ÝÀàÐÍ
²ÎÊý
ÃèÊö
char(n)
n=1 to 2000×Ö½Ú
¶¨³¤×Ö·û´®£¬n×Ö½Ú³¤£¬Èç¹û²»Ö¸¶¨³¤¶È£¬È±Ê¡Îª1¸ö×Ö½Ú³¤£¨Ò»¸öºº×ÖΪ2×Ö½Ú£©
varchar2(n)
n=1 to 4000×Ö½Ú
¿É±ä³¤µÄ×Ö·û´®£¬¾ßÌ嶨ÒåʱָÃ÷×î´ó³¤¶Èn£¬
ÕâÖÖÊý¾ÝÀàÐÍ¿ÉÒÔ·ÅÊý×Ö¡¢×ÖĸÒÔ¼°ASCIIÂë×Ö·û¼¯(»òÕßEBCDICµÈÊý¾Ý¿âϵͳ½ÓÊܵÄ×Ö·û¼¯±ê×¼)ÖеÄËùÓзûºÅ¡£
Èç¹ ......