Crear secuencia en ORACLE

-- Tabla CREATE TABLE ejemplo(id integer, nombre varchar(25), constraint pk_id primary key(id)); -- Secuencia CREATE SEQUENCE sec_ejemplo start with 1 increment by 1 nomaxvalue; -- Procedimiento almacenado CREATE OR REPLACE guardar_ejemplo(my_id OUT integer, my_nombre IN VARCHAR2) AS BEGIN SELECT sec_ejemplo.nextval INTO my_id FROM DUAL; INSERT INTO ejemplo(my_id,my_nombre); END; /
Ejemplo de creación de tabla, secuencia y Store procedure en ORACLE.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.