ÔÚ Linux Ï°²×° Oracle ºó£¬Ò»ÇÐÔËÐÐÕý³£¡£
¿ÉÊǵڶþÌìÖØÆô Linux ºó£¬ Oracle µÄ¼àÌýÆ÷Ôõô¶¼Æð²»À´¡£´íÎóÐÅÏ¢ÊÇ£º
TNS-12537: TNS:connection closed
TNS-12560: TNSrotocol adapter error
TNS-00507: Connection closed
Linux Error: 29: Illegal seek
ÔÚÍøÉÏÕÒ²»µ½½â¾ö·½·¨¡£
listener.ora ÖÐ ......
ÈçÌâ:
1.16½øÖÆÊýÔÚת»¯³É10½øÖÆÊýʱ³ö´í
SQL code:
SQL> select to_char(125,'xxxx') from dual;
TO_CHAR(125,'XXXX')
--------------------------------------------------------------------------------
7d
SQL> select to_char(7d,'xxx') from dual;
TO_CHAR(7.0E+000D,'XXX')
-------- ......
SQL£ºselect * from smfd_ForeighStockPoint where AddTime between '2010/5/26 8:30:05' and '2010/5/26 8:40:05'
oracleµÄÈÕÆÚ¸ñʽÊÇ¡®04-3Ô -10 10.32.04.460000 ÉÏÎ硯£¬ÇëÎÊÕâÑùÔõôд£¿£¿
to_dateº¯Êý
select * from smfd_ForeighStockPoint where AddTime between to_date('2010/5/26 8:30:05','yyyy/mm/dd ......
Ò»ÕÅÏúÊÛÊÂʵ±í£¬Ò»Äê1ÒÚ¶àÌõ¼Ç¼£¬ÓÐÒ»¸öʱ¼äµÄά¶È±í£¬ÀïÃæÓÐsale_date,month,week¡£ÏÖÔÚÏë»ã×Üÿ¸öÔµÄÏúÊÛ¶î
sql:
select sale_month, sum(sale_money) from sales,times
where sales.sale_time = times.sale_time and sales.sale_time > to_date('20100101','yyyymmdd')
group by sale_month
sa ......
ÔÚijÊý¾Ý¿âScottģʽÏÂÓÎEMP£¬dept±í£¬Æä¶ÔÓ¦±í½á¹¹·Ö±ðÈçÏ£º
×Ö¶ÎÃû³Æ ×Ö¶ÎÒâÒå ÊÇ·ñΪ¿Õ£¿ÀàÐÍ
EMPNO Ô±¹¤±àºÅ NOT NULL NUMBER(4)
ENAME Ô±¹¤ÐÕÃû VARCHAR2(10)
JOB Ô±¹¤ÐÕÃû VARCHAR2(9)
MGR Ô±¹¤Éϼ¶ NUMBER(4)
HIREDATE Ô±¹¤¹ÍÓÃÈÕÆÚ DATE
SAL ¹¤×Ê NUMBER(7,2)
DEPTNO Ô±¹¤ÐÕÃû NUMBER(2)
Ãû³Æ ÊÇ·ñΪ¿Õ£¿ ......
ÏúÊÛ±í½á¹¹ÈçÏÂ
SALES
sale_id NOT NULL NUMBER
prod_id NOT NULL NUMBER
cust_id NOT NULL NUMBER
time_id NOT NULL DATE
ÎÒÒª²éѯ¹ýÈ¥3ÄêµÄÏúÊۼǼ£¬ÈçÏÂSQL
SELECT *
from SALES
WHERE SYSDATE-3*365>=time_id
ÒÔÉÏsqlÓï¾äÊÇÊé±¾Éϱê¼ÇΪÕýÈ·µÄ´ð°¸£¬µ«ÊÇÎÒ¾õµÃwhereºóÃæµ ......