Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> declare variable in trigger
Hi all,
firstly sorry my english,
how can I use variable if variable name same as table's field name?
CREATE OR REPLACE TRIGGER KULLANIC_BI BEFORE INSERT ON KULLANIC
FOR EACH ROW
DECLARE
NSUID INTEGER;
BEGIN
NSUID = 5;
SELECT MAX(K.NSUID) AS F_1
INTO NSUID
FROM KULLANIC K
WHERE K.NSUID = NSUID; /*this is my variable but oracle use this
variable as a table field.*/
END;
is there any way use variable that name is same as field name?
in InterBase
SELECT MAX(K.NSUID)
FROM KULLANIC K
WHERE K.NSUID = :NSUID /* ':' this syntax uses to determine variable
*/
INTO :NSUID any help will be appreciated? Received on Fri Dec 22 2006 - 09:51:06 CST
![]() |
![]() |