Oracleѧϰ±Ê¼Ç3 ¼òµ¥²éѯ
±íµÄ²éÕÒ£º
select * from emp where (sal>500 or job='MANAGER') and ename like 'J%';
ÒýºÅÀï±ßµÄ×Ö·ûÊÇÇø·Ö´óСдµÄ¡£
²éÕÒÖ®ºó°Ñ½á¹ûÅÅÐò£º
select * from emp order by sal asc;
ascÊÇÉýÐò£¬descÊǽµÐò
¶ÔÁÐÖØÃüÃû£¬Ö»Òª´ò¸ö¿Õ¸ñ£¬ºó¸úÐÂÁÐÃû¾Í¿ÉÒÔ
select ename,sal*12+nvl(comm,0)*12 "Äêн" from emp order by "Äêн" asc;
´Ë´¦µÄnvlÊǸöСº¯Êý£¬Èç¹ûcommÊÇnullµÄ»°£¬¾ÍÓÃ0´úÌæ
×î´ó×îСֵº¯Êý£º
SQL> select max(sal) "maxSal",min(sal) "minSal" from emp;
maxSal minSal
---------- ----------
5000 800
¼òµ¥µÄǶÌײéѯ£º
SQL> select ename,sal from emp where sal=(select max(sal) from emp);
ENAME SAL&nb
Ïà¹ØÎĵµ£º
dc-test2<oracle>sqlplus /nolog
SQL*Plus: Release 10.2.0.4.0 - Production on Thu Feb 25 22:44:25 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
SQL> conn / as sysdba
Connected.
SQL> define
DEFINE _DATE = ......
create or replace procedure prc_statistic_declare(table_name varchar2 ,table_name_pass varchar2 ,not_exist varchar2,not_exist_record varchar2)
--eg:'t_statistic_bianyuanhu_month',t_statistic_bianyuanhu_month,('YEAR','STATISTIC_ID')','YESR'
is
v_sql_column varchar2(1000);
  ......
¿ªÊ¼ÔÚmyeclipse6.5ÖÐDB BROWERн¨ÁËÒ»¸öÊý¾Ý¿âÁ¬½Ó£¬Èçͼ£º
Ò»Á¬½Ó£¬±¨³öÁËÁ½¸ö´íÎó£º
1. ORA-00604 error occurred at recursive SQL level string.
2.ORA-12705: invalid or unknown NLS parameter value.
²é×ÊÁϺó½â¾ö£¨ÆÚ¼äÎÒ»¹¸Ä¹ýtestÓû§µÄÁ¬½ÓȨÏÞ£©£º
½«MyEclipseÖÐeclipseĿ¼ÏµÄeclipse.iniÎļþ£¬° ......
OracleÊý¾Ý¿âÓÐÈýÖÖ±ê×¼µÄ±¸·Ý·½·¨£¬ËüÃÇ·Ö±ðÊǵ¼³ö£¯µ¼È루EXP/IMP£©¡¢Èȱ¸·ÝºÍÀ䱸·Ý¡£µ¼³ö±¸¼þÊÇÒ»ÖÖÂß¼±¸·Ý£¬À䱸·ÝºÍÈȱ¸·ÝÊÇÎïÀí±¸·Ý¡£
Ò»¡¢ µ¼³ö£¯µ¼È루Export£¯Import£©
ÀûÓÃExport¿É½«Êý¾Ý´ÓÊý¾Ý¿âÖÐÌáÈ¡³öÀ´£¬ÀûÓÃImportÔò¿É½«ÌáÈ¡³öÀ´µÄÊý¾ÝËͻص½OracleÊý¾Ý¿âÖÐÈ¥¡£
£±¡¢ ¼òµ¥µ¼³öÊý¾Ý£¨Export£©ºÍµ¼ÈëÊý¾ ......
Oracle±íµÄ¹ÜÀí
±íÃûºÍÁÐÃûµÄÃüÃû¹æÔò£º
1±ØÐëÒÔ×Öĸ¿ªÍ·
2³¤¶È²»Äܳ¬¹ý30¸ö×Ö·û
3²»ÄÜʹÓÃOracleµÄ±£Áô×Ö
4Ö»ÄÜʹÓÃÈçÏÂ×Ö·û£ºA-Z,a-z,0-9,$,#µÈ
OracleÖ§³ÖµÄÊý¾ÝÀàÐÍ£º
1char ¶¨³¤£¬×î´ó2000×Ö·û
Àý×Ó£ºchar(10) ‘Ïþ»Ô’ Ç°Ëĸö×Ö·û·Å’Ïþ»Ô’£¬ºóÌíÁù¸ö¿Õ¸ñ²¹È«
2varchar2(20) ±ä³¤£¬×î´ ......