Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

oracleÈÕÆÚº¯Êý¼¯½õ


Ò»¡¢ ³£ÓÃÈÕÆÚÊý¾Ý¸ñʽ
1.Y»òYY»òYYY ÄêµÄ×îºóһ룬Á½Î»»òÈýλ
SQL> Select to_char(sysdate,'Y') from dual;
TO_CHAR(SYSDATE,'Y')
--------------------
7
SQL> Select to_char(sysdate,'YY') from dual;
TO_CHAR(SYSDATE,'YY')
---------------------
07
SQL> Select to_char(sysdate,'YYY') from dual;
TO_CHAR(SYSDATE,'YYY')
----------------------
007
2.Q ¼¾¶È 1¡«3ÔÂΪµÚÒ»¼¾¶È£¬2±íʾµÚ¶þ¼¾¶È¡£
SQL> Select to_char(sysdate,'Q') from dual;
TO_CHAR(SYSDATE,'Q')
--------------------
2
3.MM Ô·ÝÊý
SQL> Select to_char(sysdate,'MM') from dual;
TO_CHAR(SYSDATE,'MM')
---------------------
05
4.RM Ô·ݵÄÂÞÂí±íʾ £¨VÔÚÂÞÂíÊý×ÖÖбíʾ 5£©
SQL> Select to_char(sysdate,'RM') from dual;
TO_CHAR(SYSDATE,'RM')
---------------------
V
5.Month ÓÃ9¸ö×Ö·û³¤¶È±íʾµÄÔ·ÝÃû
SQL> Select to_char(sysdate,'Month') from dual;
TO_CHAR(SYSDATE,'MONTH')
------------------------
5ÔÂ
6.WW µ±ÄêµÚ¼¸ÖÜ £¨2007Äê5ÔÂ29ÈÕΪ2007ÄêµÚ22ÖÜ£©
SQL> Select to_char(sysdate,'WW') from dual;
TO_CHAR(SYSDATE,'WW')
---------------------
22
7.W ±¾Ôµڼ¸ÖÜ £¨2007Äê5ÔÂ29ÈÕΪ5ÔµÚ5ÖÜ£©
SQL> Select to_char(sysdate,'W') from dual;
TO_CHAR(SYSDATE,'W')
--------------------
5
8.DDD µ±ÄêµÚ¼¸Ìì £¨2007Äê5ÔÂ29ÈÕΪ2007ÄêµÚ149Ì죩
SQL> Select to_char(sysdate,'DDD') from dual;
TO_CHAR(SYSDATE,'DDD')
----------------------
149
9. DD µ±Ôµڼ¸Ìì
SQL> Select to_char(sysdate,'DD') from dual;
TO_CHAR(SYSDATE,'DD')
---------------------
29
10.D ÖÜÄÚµÚ¼¸Ìì
SQL> Select to_char(sysdate,'D') from dual;
TO_CHAR(SYSDATE,'D')
--------------------
3
11.DY ÖÐÎĵÄÐÇÆÚ¼¸ £¨ £¨2007Äê5ÔÂ29ÈÕΪÐÇÆÚ¶þ£©£©
SQL> Select to_char(sysdate,'DY') from dual;
TO_CHAR(SYSDATE,'DY')
---------------------
ÐÇÆÚ¶þ
12.HH»òHH12 12½øÖÆСʱÊý £¨16£º09·ÖΪÓÃ12СʱÖƼÆʱΪ4µã£©
SQL> Select to_char(sysdate,'HH') from dual;
TO_CHAR(SYSDATE,'HH')
---------------------
04
13.HH24 24СʱÖÆ
SQL> Select to_char(sysdate,'HH24') from dual;
TO_CHAR(SYSDATE,'HH24')
-----------------------


Ïà¹ØÎĵµ£º

Oracle NULL ¿Õ×Ö·û´®¡£¡£¡£¡£¡£¡£

º¬Òå½âÊÍ£º
ÎÊ£ºÊ²Ã´ÊÇNULL£¿
´ð£ºÔÚÎÒÃDz»ÖªµÀ¾ßÌåÓÐʲôÊý¾ÝµÄʱºò£¬Ò²¼´Î´Öª£¬¿ÉÒÔÓÃNULL£¬ÎÒÃdzÆËüΪ¿Õ£¬ORACLEÖУ¬º¬ÓпÕÖµµÄ±íÁ㤶ÈΪÁã¡£
ORACLEÔÊÐíÈκÎÒ»ÖÖÊý¾ÝÀàÐ͵Ä×Ö¶ÎΪ¿Õ£¬³ýÁËÒÔÏÂÁ½ÖÖÇé¿ö£º
1¡¢Ö÷¼ü×ֶΣ¨primary key£©£¬
2¡¢¶¨ÒåʱÒѾ­¼ÓÁËNOT NULLÏÞÖÆÌõ¼þµÄ×Ö¶Î
˵Ã÷£º
1¡¢µÈ¼ÛÓÚûÓÐÈκ ......

ORACLE¸´Ï°(Ò»)

ºÜ¾ÃûÓÐÓõ½OracleÁË£¬Ç°Ð©ÈÕ×Óµ¥Î»½ÓÁËÒ»¸öOracleÊý¾Ý¿âµÄÏîÄ¿£¬×ÔÈ»ÐèÒª¸´Ï°Ò»Ï£¬ÏÖ½«¸´Ï°¹ý³ÌÖеÄһЩҪµã¼Ç¼ÏÂÀ´£¬ÒÔ±¸²éÔÄ¡£
Ò»¡¢     ±íÁÐÊý¾ÝÀàÐÍ
1¡¢×Ö·û
1)        VARCHAR2(n)£¬nÊDZØÐëµÄ£¬ÓÃÓÚ´æ´¢×Ϊ4000¸ö×Ö·ûµÄ×Ö·û´®¡£µ«ËüÊǿɱäµÄ£¬Ö»Ê¹Ó ......

Ò»¸ö×Ö·ûµ¼ÖÂoracle°²×°³öÏÖora 12154

Ç°Á½Ì죬ÔÚ¿Í»§µÄÐéÄâ»úÉÏ°²×°oracleÈí¼þÓÃÓÚ²¿Êð×Ô¼ºµÄÓ¦ÓᣲÅ×°ºÃ²»¾Ã£¬ÓÉÓÚÐèÒªÅäÖÃÍøÂ簲ȫ£¬°ÑÕû¸öÐéÄâ»ú¶¼²ùµô£¬¿Ë¡Á˸öÅäÖúÃÍøÂ簲ȫµÄÐéÄâ»ú¸øÎÒÃÇʹÓã¬Ö»µÃÖØ×°oracle 10g¡£
µ±µÚ¶þ´ÎÔÚÐéÄâ»úÉÏ°²×°oracleʱ£¬Êý¾Ý¿âÃûºÍϵͳÕ˺ŵÄÃÜÂ붼×öÁ˸Ķ¯£¬½á¹ûÖ±½Óµ¼ÖÂÔÚ´´½¨oracleʵÀýʱµ¯³öora-12154´íÎó¡£Ñ¡Ôñ¡¾º ......

oracle ĬÈÏÁÙʱ±í¿Õ¼ä

¡¡¡¡ ÎÒÃÇ¿ÉÒÔͨ¹ýÏÂÃæµÄÓï¾äÀ´²éѯÊý¾Ý¿âµÄĬÈÏÁÙʱ±í¿Õ¼ä£º
¡¡¡¡
¡¡¡¡SQL> select * from database_properties where property_name = 'DEFAULT_TEMP_TABLESPACE'£»
¡¡¡¡¡¡
¡¡¡¡ ĬÈÏÁÙʱ±í¿Õ¼äµÄÏÞÖÆ£º
¡¡¡¡
¡¡¡¡1. ĬÈÏÁÙʱ±í¿Õ¼ä±ØÐëÊÇTEMPORARYµÄ:
¡¡¡¡
¡¡¡¡SQL> alter database default temporary t ......

ʹÓÃJavaµ÷ÓÃOracleÊý¾Ý¿âµÄ´æ´¢¹ý³ÌʵÀý

Ò»£ºÎÞ·µ»ØÖµµÄ´æ´¢¹ý³Ì
1¡¢½¨Á¢´æ´¢¹ý³Ì
CREATE OR REPLACE PROCEDURE TESTA(PARA1 IN VARCHAR2,PARA2 IN VARCHAR2) AS
BEGIN
INSERT INTO T_TEST (I_ID,I_NAME) VALUES (PARA1, PARA2);
END TESTA;
2¡¢ÏàÓ¦µÄJAVA³ÌÐò
import java.sql.*;
import java.io.OutputStream;
import java.io.Writer;
import java.sq ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ