CREATE DEFINER=`gehouse`@`%` PROCEDURE getAccountDetialByLoginnameAndPassword`(IN _login VARCHAR(32), IN _psw VARCHAR(32), OUT _ret INTEGER(10), OUT _id INTEGER(10), OUT _name VARCHAR(32), OUT _email VARCHAR(32), OUT _phone VARCHAR(20), OUT _active INTEGER(11)) SQL SECURITY INVOKER BEGIN DECLARE CONTINUE HANDLER FOR NOT FOUND set _ret =-1; set _ret = 0 ; -- get base account information select id,name,email,phone,active into _id,_name,_email,_phone,_active from tx_account where tx_account.`loginname`=_login and tx_account.`password`=MD5(_psw) and active=1; if _ret = 0 then -- get role list of account select a.id as id ,a.name as name,a.priority as priority from tx_account_role b left join tx_role a on b.role=a.id where b.account=_id; end if; END; 就比如这个存储过程,怎么翻译成oracle的呢,或者是postgresql的也可以 在线等~!
SQL SECURITY INVOKER
BEGIN
DECLARE CONTINUE HANDLER FOR NOT FOUND set _ret =-1; set _ret = 0 ; -- get base account information
select id,name,email,phone,active
into _id,_name,_email,_phone,_active
from tx_account
where tx_account.`loginname`=_login and tx_account.`password`=MD5(_psw) and active=1; if _ret = 0 then
-- get role list of account
select a.id as id ,a.name as name,a.priority as priority
from tx_account_role b left join tx_role a on b.role=a.id
where b.account=_id;
end if;
END;
就比如这个存储过程,怎么翻译成oracle的呢,或者是postgresql的也可以
在线等~!