![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
DataBase
女雅乱
这个作者很懒,什么都没留下…
展开
-
Query the prime number by oracle procedure
Get the prime number between 100 and 150: create or replace procedure getPrime is l number(3):=101; k number(3); m number(3); begin while l < 150 loop k:= round(sqrt(l),0);--get the ...2009-09-14 18:05:47 · 100 阅读 · 0 评论 -
Some examples of procudure of Sqlserver 2000
I have read SQL server 2000 stored procedures HandBook,just do some easy examples of it.here is the code: create procedure Example_05 @ValIn bigint,@ValOut bigint output as begin if @ValIn > ...2009-09-07 18:18:42 · 72 阅读 · 0 评论 -
plsql learning - six:DML trigger
The trigger triggered when DML sentences executed,the steps are: 1)If there are before-triggers before the sentence,run these triggers. 2)For every row of the sentences that involved: a.if there...原创 2009-12-29 14:10:13 · 102 阅读 · 0 评论 -
oracle datatype
Oracle 9i共提供了16种标量数据类型表: 名称 含义 Char 用于描述定长的字符型数据,长度<=2000字节 varchar2 用于描述变长的字符型数据,长度<=4000字节 nchar 用来存储Unicode字符集的定长字符型数据,长度<=1000字节 nvarchar2 用来存储Unicode字符集的变长字...原创 2009-12-29 13:39:17 · 270 阅读 · 0 评论 -
plsql learning - five:trigger
When we want to update the info of some important tables,we can use the trigger,it can be triggered after we use some DML for some tables.here is the example of it: create or replace trigger UpdateMa...原创 2009-12-28 18:46:38 · 88 阅读 · 0 评论 -
plsql learning - four:procedure
There are three type of parameters of procedure,IN,OUT,IN OUT,here is the example: create or replace procedure ModeTest( p_InParameter in number, p_OutParameter out number, p_InOutParameter in ...2009-12-25 16:38:26 · 75 阅读 · 0 评论 -
plsql learning - three:debug
The debug method three: we can use the debug tools of plsql developer,just like we debug our code in eclipse or vc. create or replace package StudentFetch as type t_Students is table of stude...2009-12-24 18:16:54 · 61 阅读 · 0 评论 -
plsql learning - two:debug
In order to use dbms_output.put_line to print the debug info on screen,we need to fix the procedure debug: create or replace package Debug as procedure Debug(p_Description in varchar2,p_Value in...2009-12-23 09:01:57 · 74 阅读 · 0 评论 -
plsql learning - one:debug and track
All these codes test on oracle9.2.First,give the all the base tables and datas for learning pl/sql.They will be all used in the following testing. create sequence student_sequence start with 10000...2009-12-22 18:00:21 · 114 阅读 · 0 评论 -
Oracle functions
Examples of function in oracle 9i,pls check the defination of them if not clear about it. 1.select ascii('A') A,ascii('a') a,ascii(0) zero,ascii(' ') space from dual 65 97 48 32 2.select chr(54...2009-12-18 11:32:20 · 95 阅读 · 0 评论 -
Oracle function : to_date and to_char
First,here are some defination of date. D :the day number of the week,example: Monday is two DAY :the day name ,example:Monday DD : the day number of the month,from 0 to 31 DDD : the day numbe...2009-12-17 17:35:23 · 69 阅读 · 0 评论 -
The source of get connection of oracle and call procedure of oracle
For get the connection of oracle database ,you should add the oracle driver to the classpath first.and when you finished ,should close all the resouces. import java.sql.Connection; import java.sql.D...2009-09-15 16:44:31 · 94 阅读 · 0 评论 -
procedure example of oracle procedure
Some example for memory. create or replace procedure TQ_FirstProc is classname_value class %rowtype; begin select * into classname_value from class where class_id='2'; dbms_output.put_line(...2009-09-14 18:12:21 · 90 阅读 · 0 评论 -
Use the batch file to execute the sql
REM ********** REM Modify the values below to match your configuration REM ********** set v_mysqlHost=192.168.*.130 set v_mysqlPort=3306 set v_mysqlUser=admin set v_mysqlPassword=111111 set v_m...2010-06-23 11:18:30 · 130 阅读 · 0 评论