OracleµÄÈÕÆÚº¯Êý
OracleµÄÈÕÆÚº¯Êý
³£ÓÃÈÕÆÚÐͺ¯Êý
1¡£Sysdate µ±Ç°ÈÕÆÚºÍʱ¼ä
SQL> Select sysdate from dual;
SYSDATE
----------
21-6ÔÂ -05
2¡£Last_day ±¾ÔÂ×îºóÒ»Ìì
SQL> Select last_day(sysdate) from dual;
LAST_DAY(S
----------
30-6ÔÂ -05
3¡£Add_months(d,n) µ±Ç°ÈÕÆÚdºóÍÆn¸öÔÂ
ÓÃÓÚ´ÓÒ»¸öÈÕÆÚÖµÔö¼Ó»ò¼õÉÙһЩÔ·Ý
date_value:=add_months(date_value,number_of_months)
SQL> Select add_months(sysdate,2) from dual;
ADD_MONTHS
----------
21-8ÔÂ -05
4¡£Months_between(f,s) ÈÕÆÚfºÍs¼äÏà²îÔÂÊý
SQL> select months_between(sysdate,to_date('2005-11-12','yyyy-mm-dd'))from dual;
MONTHS_BETWEEN(SYSDATE,TO_DATE('2005-11-12','YYYY-MM-DD'))
----------------------------------------------------------
-4.6966741
5¡£NEXT_DAY(d, day_of_week)
·µ»ØÓÉ"day_of_week"ÃüÃûµÄ£¬ÔÚ±äÁ¿"d"Ö¸¶¨µÄÈÕÆÚÖ®ºóµÄµÚÒ»¸ö¹¤×÷ÈÕµÄÈÕÆÚ¡£²ÎÊý"day_of_week"±ØÐëΪ¸ÃÐÇÆÚÖеÄijһÌì¡£
SQL> SELECT next_day(to_date('20050620','YYYYMMDD'),1) from dual;
NEXT_DAY(T
----------
26-6ÔÂ -05
6¡£current_date()·µ»Øµ±Ç°»á»°Ê±ÇøÖеĵ±Ç°ÈÕÆÚ
date_value:=current_date
SQL> column sessiontimezone for a15
SQL> select sessiontimezone,current_date from dual;
SESSIONTIMEZONE CURRENT_DA
--------------- ----------
+08:00 13-11ÔÂ-03
SQL> alter session set time_zone='-11:00' 2 /
»á»°ÒѸü¸Ä¡£
SQL> select
Ïà¹ØÎĵµ£º
1¡¢
Á¬½ÓÊý¾Ý¿â
connect uuu/ooo
connect
sys/ok as sysdba
2¡¢
´´½¨±í¿Õ¼ä
create tablespace stu(±í¿Õ¼äÃû
) datafile
‘
e:\stu.dbf
’
size 100m autoextend on next 5m maxsize 500m;
3¡¢& ......
ÔÚoracleÖУ¬ÎÒÃÇʹÓÃin·½·¨²éѯ¼Ç¼µÄʱºò£¬Èç¹ûinºóÃæµÄ²ÎÊý¸öÊý³¬¹ý1000¸ö£¬ÄÇô»á·¢Éú´íÎó£¬ÏÂÃæµÄÕâ¸ö·½·¨¾ÍÊǽâ¾öÕâ¸öÎÊÌâµÄ£¬Ëü½«ÎÒÃǵÄÉÏǧ¸ö²ÎÊý·Ö³É¼¸×飬±£Ö¤Ã¿×éµÄ²ÎÊý¸öÊý²»³¬¹ý1000
/**
* Éú³É·ûºÏÌõ¼þµÄsqlÓï¾ä,½â¾öinÎÊÌâ
* @param sqlParam£ºÎÒÃÇÐèÒª´¦ÀíµÄ²ÎÊýµÄ×Ö·û´®¸ñʽ£¬ÀýÈ ......
CREATE OR REPLACE PROCEDURE kevin_proc(x varchar) IS
a VARCHAR(20);
b VARCHAR(20);
CURSOR mycur(rn NUMBER) IS SELECT * from t_kevin_test WHERE ROWNUM<rn;
BEGIN
OPEN mycur(10);
LOOP FETCH mycur INTO a,b;
EXIT WHEN mycur%NOTFOUND;
Dbms_Output.put_line('a: '||a);
Dbms_Output.put_line('b: '| ......
´óÖ·ÖΪÈý²¿·Ý£¬1.SQL£¬2.ERP±¾Éí£¬3.±¾»ú
1.Èç¹ûÊÇSQLµ¼³öʱ³öÏÖ£¬ÂÒÂë¿ÉÒÔͨ¹ýÐÞ¸ÄNLS_LANG£¬À´±ÜÃâÂÒÂ룬
·±ÌåÐ޸ijɣºTRADITIONAL CHINESE_TAIWAN.ZHT16BIG5
¼òÌåÐ޸ijÉ: SIMPLIFIED CHINESE_CHINA.ZHS16GBK
Ó¢ÎľͲ»ÓÃ˵ÁË£¡£¡
2.Èç¹ûÊÇERP export ʱ³öÏÖÂÒÂ룬¿ÉÒÔͨ¹ýÉèÖÃprofileÀ´ÉèÖÃFND: NATIVE CLIENT ENC ......
Oracle Êý¾ÝÀàÐͼ°´æ´¢·½Ê½
Ô¬¹â¶« Ô´´
¸ÅÊö
ͨ¹ýʵÀý£¬È«Ãæ¶øÉîÈëµÄ·ÖÎöoralceµÄ»ù±¾Êý¾ÝÀàÐͼ°ËüÃǵĴ洢·½Ê½¡£ÒÔORACLE 10GΪ»ù´¡£¬½éÉÜoralce
10gÒýÈëµÄеÄÊý¾ÝÀàÐÍ¡£ÈÃÄã¶Ôor ......