oracleѧϰ±Ê¼Ç£¨Ò»£©·ÖÏí
1¡¢»ù±¾Óï·¨
SELECT
from
WHERE
GROUP BY
HAVING
ORDER BY
SELECT:²éѯµÄ×Ö¶Î
1¡¢¿ÉÓÃ*±íʾËùÓÐ×ֶΡ£
2¡¢×Ö¶ÎÖ®¼äÓöººÅ·Ö¸î¡£
3¡¢¿ÉΪ×Ö¶ÎÆð±ðÃû Æä±ðÃû¿Éд³ÉSELECT AAAA¡£AA AS SS »ò AAAA¡£AA SS ¿ÉÊ¡ÂÔas
4¡¢¿ÉÖ±½Óд×Ö¶ÎÖµ£ºÈç SELECT AAAA¡£AA SS,'ÕÅÈý' NAME from ¡£¡£¡£
from:²éѯµÄ±íÃû
1¡¢±íÃû¼äÓöººÅ·Ö¸î
2¡¢¿ÉΪ±íÆð±ðÃû Æä±ðÃû¿Éд³É from AAAA AS T »ò from AAAA T ¿ÉÊ¡ÂÔas
WHERE:²éѯÌõ¼þ
º¯Êý£º
NVL
||
SYSDATE
3¡¢Á¬½Ó
Á¬½Ó£º×óÁª(+)
×ÔÁª¡¢ÄÚÁª¡¢ÍâÁª
4¡¢×Ó²éѯ£º
5¡¢ºÏ²¢Êý¾Ý£º
UNION
UNION ALL
6¡¢´¥·¢Æ÷£º
Àý×Ó1£º²åÈëÖ÷¼ü
CREATE OR REPLACE TRIGGER AA_
BEFORE INSERT ON AA
FOR EACH ROW
DECLARE
BEGIN
SELECT AA_SEQ.NEXTVAL INTO :NEW.AA from DUAL;
END AA_;
Àý×Ó2£º
CREATE OR REPLACE TRIGGER ADDB2B_GHDWUSER
AFTER INSERT ON B2B_GHDWUSER FOR EACH ROW
DECLARE
V_MENUID B2B_GHJBMENU.MENUID%TYPE;
_MENUID VARCHAR2(20);
CURSOR INSERTUMENU IS
SELECT A.MENUID from B2B_GHJBMENU A,XTGHDW B
WHERE A.JNAM = B.JB AND B.DWBM= :NEW.GHDWBM;
V_LXBM XTFBLX.LXBM%TYPE;
CURSOR INSERTLXBM IS
SELECT DISTINCT LXBM from XTFBLX;
BEGIN
OPEN INSERTUMENU;
FETCH INSERTUMENU INTO V_MENUID,_MENUID;
WHILE INSERTUMENU%FOUND LOOP
INSERT INTO B2B_USERMENU (USERBM,MENUID)
VALUES(:NEW.USERBM,V_MENUID);
FETCH INSERTUMENU INTO V_MENUID;
END LOOP;
CLOSE INSERTUMENU;
OPEN INSERTLXBM;
FETCH INSERTLXBM INTO V_LXBM;
WHILE INSERTLXBM%FOUND LOOP
INSERT INTO B2B_USERXX (USERBM,LXBM)
VALUES(:NEW.USERBM,V_LXBM);
FETCH INSERTLXBM INTO V_LXBM;
END LOOP;
CLOSE INSERTLXBM;
IF :OLD.SWBZ='2' AND :NEW.SWBZ = '0' THEN
BEGIN
SELECT TID,FUSED INTO L_ID,L_FUSED from RPC_CONTRAC WHERE HTBM = :NEW.HTBM AND HTLB <> '9';
IF L_FUSED=1 THEN
RAISE_APPLICATION_ERROR(-20005,'²»ÄÜɾ³ý!');
END IF;
DELETE RPC_CONTRACENTRY WHERE TID = L_ID;
DELETE RPC_CONTRAC
Ïà¹ØÎĵµ£º
Ò». Àí½âʲôÊÇÊý¾Ý¿â»Ö¸´
µ±ÎÒÃÇʹÓÃÒ»¸öÊý¾Ý¿âʱ£¬×ÜÏ£ÍûÊý¾Ý¿âµÄÄÚÈÝÊÇ¿É¿¿µÄ¡¢ÕýÈ·µÄ£¬µ«ÓÉÓÚ¼ÆËã»úϵͳµÄ¹ÊÕÏ£¨Ó²¼þ¹ÊÕÏ¡¢Èí¼þ¹ÊÕÏ¡¢ÍøÂç¹ÊÕÏ¡¢½ø³Ì¹ÊÕϺÍϵͳ¹ÊÕÏ£©Ó°ÏìÊý¾Ý¿âϵͳµÄ²Ù×÷£¬Ó°ÏìÊý¾Ý¿âÖÐÊý¾ÝµÄÕýÈ·ÐÔ£¬ÉõÖÁÆÆ»µÊý¾Ý¿â£¬Ê¹Êý¾Ý¿âÖÐÈ«²¿»ò²¿·ÖÊý¾Ý¶ªÊ§¡£Òò´Ëµ±·¢ÉúÉÏÊö¹ÊÕϺó£¬Ï£ÍûÄÜÖع¹Õâ¸öÍêÕ ......
OracleÊý¾Ýµ¼Èëµ¼³öimp/exp¾ÍÏ൱ÓÚoracleÊý¾Ý»¹ÔÓ뱸·Ý¡£expÃüÁî¿ÉÒÔ°ÑÊý¾Ý´ÓÔ¶³ÌÊý¾Ý¿â·þÎñÆ÷µ¼³öµ½±¾µØµÄdmpÎļþ£¬impÃüÁî¿ÉÒÔ°ÑdmpÎļþ´Ó±¾µØµ¼Èëµ½Ô¶´¦µÄÊý¾Ý¿â·þÎñÆ÷ÖС£ ÀûÓÃÕâ¸ö¹¦ÄÜ¿ÉÒÔ¹¹½¨Á½¸öÏàͬµÄÊý¾Ý¿â£¬Ò»¸öÓÃÀ´²âÊÔ£¬Ò»¸öÓÃÀ´ÕýʽʹÓá£
Ö´Ðл·¾³£º¿ÉÒÔÔÚSQLPLUS.EXE»òÕßDOS£¨ÃüÁîÐУ©ÖÐÖ´Ð ......
¿ª·ÅÐÔ:
SQL Server
Ö»ÄÜÔÚwindows ÉÏÔËÐУ¬Ã»ÓÐË¿ºÁµÄ¿ª·ÅÐÔ£¬²Ù×÷ϵͳµÄϵͳµÄÎȶ¨¶ÔÊý¾Ý¿âÊÇÊ®·ÖÖØÒªµÄ¡£Windows9XϵÁвúÆ·ÊÇÆ«ÖØÓÚ×ÀÃæÓ¦Óã¬NT serverÖ»ÊʺÏÖÐСÐÍÆóÒµ¡£¶øÇÒwindowsƽ̨µÄ¿É¿¿ÐÔ£¬°²È«ÐÔºÍÉìËõÐÔÊǷdz£ÓÐÏ޵ġ£Ëü²»ÏóunixÄÇÑù¾Ã¾¿¼Ñ飬ÓÈÆäÊÇÔÚ´¦Àí´óÊý¾ÝÁ¿ ......
Ò»¡¢oracleµ¼³öexcel
·½·¨Ò»£º×î¼òµ¥µÄ·½·¨---Óù¤¾ßplsql dev
Ö´ÐÐFile =>new Report Window ¡£ÔÚsql±êÇ©ÖÐдÈëÐèÒªµÄsql£¬µã»÷Ö´Ðлò°´¿ì½Ý¼üF8£¬»áÏȳԳö²éѯ½á¹û¡£ÔÚÓҲ๤¾ßÀ¸£¬¿ÉÒÔÑ¡Ôñ°´Å¥Áí´æΪhtml¡¢copy as html¡¢export results£¬ÆäÖÐexport results°´Å¥ÖоͿÉÒÔµ¼³öexcelÎļþ¡¢csvÎļþ¡¢tsvÎļþ¡¢xmlÎļþ¡ ......
create or replace procedure aa1 is
v_aa varchar2(20);
v_bb varchar2(20);
va_aa varchar2(20);
va_bb varchar2(20);
va_number_aa number;
message varchar2(60);
CURSOR aas is
SELECT DISTINCT aa.aa, aa.bb from aa;
CURSOR aaas is
SELECT DISTINCT aaa.aa, aaa.bb from aaa where aaa.aa = v_aa ......