help!! with Secuence field (autonumeric)
Posted by:
axel lope
Date: April 17, 2005 04:20PM
i try to create an autonumeric field, with select max for the pk field
but when y try to insert in this table return this error
ERROR 1100 (HY000): Table 'ALM_PROVEEDORES' was not locked with LOCK TABLES
what is the problem?
thanks....
CREATE TRIGGER TRG_PROV_BINSERT
BEFORE INSERT ON ALM_PROVEEDORES
FOR EACH ROW
BEGIN
DECLARE N INT;
SELECT ifnull(max(PRO_CORReLATIVO),0)+1 INTO N FROM
almacen.ALM_PROVEEDORES LIMIT 1;
SET NEW.PRO_CORRELATIVO = N;
END;
Subject
Views
Written By
Posted
help!! with Secuence field (autonumeric)
4309
April 17, 2005 04:20PM
4028
April 22, 2005 05:04AM
2616
April 22, 2005 03:43PM
3804
April 24, 2005 01:22PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.