Browsing articles tagged with " sql statements"
Dec
13
13
Procedure in PL/SQL
Syntax:
PROCEDURE name [ARGUMENT LIST] {IS,AS}
variable declarations
BEGIN
program code
END;
Example:
PROCEDURE swap (A IN OUT NUMBER, B IN OUT NUMBER)
IS
temp NUMBER;
BEGIN
temp :=A;
A :=B;
B :=temp;
END;
Dec
13
13
Trigger in PL/SQL
Syntax for creating a database trigger:
CREATE OR REPLACE TRIGGER trigger-name
{BEFORE |AFTER } verb-list ON table-name
[FOR EACH ROW[WHEN condition]]
DECLARE
declaration
BEGIN
PL/SQL code
END;
Example:
create or replace trigger check_salary
before insert or update of sal, job
on EMP
for each row when(new.job!=director)
Declare
minsal number;
maxsal number;
begin
select min_sal, max_sal into minsal, maxsal
From salary_mast where job=:new.job;
if(:new-sal<minsal or :new-sal>maxsal)
Then
Message (‘salary out of range’);
end If;
End;
Namaste!
Recent Posts
Tags
basic java
c++
C++ coding
C++ prgoram
c++ prgram
C++ programmer
C++ programming
c++ syntax
database
function
functions in oracle
java
Java Bean
java program
java programmer
java programming
JDK
JSF
JSP
loop
nepali wordpress designer
Operator Precedence
oracle
oracle 9i
oracle database
oralce
package
PL/SQL
Servlet
sql
sql statements
wordperss designer nepal
wordpree designer
wordpres plugin
wordpress blog
wordpress blog design
wordpress blog nepal
wordpress design
wordpress designer
wordpress designer nepal
wordpress nepal
wordpress news
wordpress news nepal
wordpress plugins
wordpress themes
Latest Tweets
- You can't beat that!!! ha ha ha ha
http://t.co/RncN75Qy - posted on 18/05/2012 08:51:10 - Would you do these workouts -- at work? http://t.co/9FjVfJZ2 - posted on 18/05/2012 08:46:13
- Congratulations didi n Vinaju! http://t.co/tgWnJQ7l - posted on 18/05/2012 06:04:54




