Oracle Function
CREATE OR REPLACE FUNCTION OFFICE.fbill_getbalance (billid NUMBER, total NUMBER)
RETURN NUMBER
IS
paid NUMBER;
balance NUMBER;
BEGIN
balance := total;
--get total paid
SELECT SUM (n_paidamount)
INTO paid
from tbnk_payoutbillconn i
WHERE i.n_billid = billid AND i.s_billorpur = 'B';
--get balance of bill
balance := NVL (total, 0) - NVL (paid, 0);
RETURN balance;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
RETURN balance;
WHEN OTHERS
THEN
RETURN balance;
RAISE;
END fbill_getbalance;
Ïà¹ØÎĵµ£º
½ñÌì¸Õ×°ÁË oracle
¼Ç¼һ²¿·Ö´úÂë ÒÔ±¸Ê¹ÓÃ
cmd²Ù×÷
Á¬½ÓÊý¾Ý¿â sqlplus "Óû§Ãû/ÃÜÂë"
²»Çø·Ö´óСд
c/Ô´Ê/Ð޸ĺó ÐÞ¸ÄsqlÓï¾ä
lÊý×Ö Êý×Ö ÏÔʾ¼¸Ðе½¼¸ºÅµÄsqlÓï¾ä
/Ö´ÐÐ
shutdown ¹Ø±Õ·þÎñ
startup Æô¶¯·þÎñ
save ·¾¶/ÎļþÃû.ºó׺ ±£´æ»º³åÇøsqlÓï¾ä
get Îļþ ......
oracleÌṩÈýÖָ߼¶±¸·Ý¹¦ÄÜ
¸ß¼¶¸´ÖÆ£¨Advanced Replication£©
Á÷¸´ÖÆ£¨Streams Replication£©
±¸¿â£¨Dataguard£©
Ò» dataguard£º
dataguardÔڸ߿ÉÓü°ÈÝÔÖ·½ÃæÒ»°ãÊÇdbaµÄÊ×Ñ¡£¬²»¹ÜÊÇÎïÀí±¸Óÿ⣨physical standby database£©»¹ÊÇÂß¼±¸Óÿ⣨logical standby database£©£¬ËüÃǶ¼¾ßÓÐһЩ¹²Í¬µÄ´ýÕ÷¡£
ÅäÖú͹ÜÀí· ......
¡¡¡¡alter any cluster ÐÞ¸ÄÈÎÒâ´ØµÄȨÏÞ
¡¡¡¡alter any index ÐÞ¸ÄÈÎÒâË÷ÒýµÄȨÏÞ
¡¡¡¡alter any role ÐÞ¸ÄÈÎÒâ½ÇÉ«µÄȨÏÞ
¡¡¡¡alter any sequence ÐÞ¸ÄÈÎÒâÐòÁеÄȨÏÞ
¡¡¡¡alter any snapshot ÐÞ¸ÄÈÎÒâ¿ìÕÕµÄȨÏÞ
¡¡¡¡alter any table ÐÞ¸ÄÈÎÒâ±íµÄȨÏÞ
¡¡¡¡alter any trigger ÐÞ¸ÄÈÎÒâ´¥·¢Æ÷µÄȨÏÞ
¡¡¡¡alter clu ......
ÔÚÆô¶¯oracle·þÎñʱ,Ê×ÏÈ»áÔÚ·þÎñ¶ËÕÒ
1.spfile<sid>.ora
ÓÃÓÚÆô¶¯Àý³Ì,Èç¹ûÕÒ²»µ½spfile<sid>.ora,ÔòʹÓ÷þÎñ¶ËȱʡµÄ
2.spfile
À´Æô¶¯,Èç¹ûȱʡµÄspfileÒ²ÕÒ²»µ½,ÔòʹÓÃ
3.init<sid>.ora
À´Æô¶¯Àý³Ì,×îºóÔòÊÇʹÓÃȱʡµÄ
4.pfile
.µ±È»ÄãÒ²¿ÉÒÔÖ¸¶¨pfileÀ´¸²¸ÇȱʡspfileÆô¶¯Àý³Ì,»òͨ¹ýspfile= ......
package test;
import java.text.SimpleDateFormat;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import org.hibernate.classic.Session;
import po.Stu;
public class Insert1 {
/**
* @param args
*/
public ......