jdbcÖе÷ÓÃoracle´æ´¢¹ý³Ì
1¡¢´´½¨±í£º
create table stud(
sid int,
sname varchar2(50)
)
²¢²åÈëÒ»ÌõÊý¾Ý
insert into stud values(1,'Tom')
2¡¢´´½¨´æ´¢¹ý³Ì
--´´½¨´æ´¢¹ý³Ì
create or replace procedure pro_select_name(
v_sid in stud.sid%type,
v_sname out stud.sname%type
)
--ÉùÃ÷Çø
is
--Ö´ÐÐÌå
begin
select sname into v_sname from stud where sid = v_sid;
--Òì³£´¦Àí
exception
when others then
dbms_output.put_line(sqlcode||sqlerrm);
end;
3¡¢jdbcÖе÷ÓÃ
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Types;
public class TestPro {
public void test(){
Connection con = null;
CallableStatement cst = null;
try{
 
Ïà¹ØÎĵµ£º
¹ØÓÚOracleµÄsession
1.ÈçºÎ²é¿´session¼¶µÄµÈ´ýʼþ£¿
µ±ÎÒÃǶÔÊý¾Ý¿âµÄÐÔÄܽøÐе÷Õûʱ£¬Ò»¸ö×îÖØÒªµÄ²Î¿¼Ö¸±ê¾ÍÊÇϵͳµÈ´ýʼþ¡£$system_event,v$session_event,v$session_waitÕâÈý¸öÊÓͼÀï¼Ç¼µÄ¾ÍÊÇϵͳ¼¶ºÍsession¼¶µÄµÈ´ýʼþ£¬Í¨¹ý²éѯÕâЩÊÓͼÄã¿ÉÒÔ·¢ÏÖÊý¾Ý¿âµÄһЩ²Ù×÷µ½µ×ÔÚµÈ ......
ÒÔϼ¸ÖÖÔ¼Êø ¡¢²¢ Ò»Ò»Áо٣º
1.Ö÷¼üÔ¼Êø£º
Òª¶ÔÒ»¸öÁмÓÖ÷¼üÔ¼ÊøµÄ»°£¬ÕâÁоͱØÐëÒªÂú×ãµÄÌõ¼þ¾ÍÊÇ·Ö¿Õ
ÒòΪÖ÷¼üÔ¼Êø£º¾ÍÊǶÔÒ»¸öÁнøÐÐÁËÔ¼Êø£¬Ô¼ÊøΪ£¨·Ç¿Õ¡¢²»Öظ´£©
ÒÔÏÂÊÇ´úÂë Òª¶ÔÒ»¸öÁмÓÖ÷¼ü£¬ÁÐÃûΪid,±íÃûΪemp
¸ñʽΪ£º
alter table ±í¸ñÃû³Æ add constraint Ô¼ÊøÃû³Æ Ôö¼ÓµÄÔ¼ÊøÀàÐÍ £¨ÁÐÃû£©
À ......
×°ÍêÁËOracle 10gÊý¾Ý¿â£¬ÍüÁ˸øscottÕË»§½âËø¡£Õâʱ¿ÉÒÔÔÚsql plus¹¤¾ßÀ¿ªÊ¼|ËùÓгÌÐò|<Oracle-Home>|Ó¦ÓóÌÐò¿ª·¢|SQL Plus£©£¬Ò²¿ÉÒÔÔÚ¿ØÖÆ̨ͨ¹ýÃüÁîÐиøscottÕË»§½âËø¡£
ÔÚµÚÒ»ÖÖÇé¿öÏ£¬ÒÔsystemÕË»§µÇ¼SQL Plus£¬È»ºóʹÓÃÃüÁî“alter user scott accoun ......
Oracle9i Database Release 2 Enterprise/Standard/Personal Edition for Windows NT/2000/XP
http://download.oracle.com/otn/nt/oracle9i/9201/92010NT_Disk1.zip
http://download.oracle.com/otn/nt/oracle9i/9201/92010NT_Disk2.zip
http://download.oracle.com/otn/nt/oracle9i/9201/92010NT_Disk3.zip
Oracle9i ......