Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is your PL/SQL equivalent?

Status
Not open for further replies.

florida41

Technical User
May 13, 2004
95
0
0
US
Please advise what is your equivalent language to PL/SQL?

If I use mySQL, what would I use to write triggers etc...?

I am thinking of using mySQL instead of Oracle but I like PL/SQL and not sure what mySQL uses??
 
Mysql does not currently support triggers nor stored procedures.

They will use PSM (with some standard deviations as usula) as language for routines and triggers.
 
What is PSM?

So Oracle has the advantage of having triggers where mySQL doesnt have triggers.
 
The MaxDB version has a Create Trigger in their docs, Normally you would want to use MaxDB because of support for transaction processing.
 
What is PSM?

PSM stands for persistant stored modules and is a lnguage defined by ISO for defining stored procedures, functions and methods. ISO also has defined syntax for trigger definitions. PL/SQL does not comply with PSM.

Example of a procedure in PSM

Code:
create procedure insertsMany(rows int)
modifies sql data
begin
    declare cnt int default 1;
    while cnt < rows do
       insert into t values(cnt,'garbled data');
       set cnt = cnt + 1;
     end while;
end

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top