Gracias de antemano
Código SQL:
Ver original
CREATE TABLE reservation ( res_date DATE, member_id NUMBER(10), title_id NUMBER(10), CONSTRAINT reservation_resdate_mem_tit_pk PRIMARY KEY(member_id)); CREATE SEQUENCE member_id_seq START WITH 101 INCREMENT BY 100 MAXVALUE 99999999999999999 nocache nocycle; SELECT member_id_seq.NEXTVAL FROM dual; SELECT member_id_seq.CURRVAL FROM dual; SELECT member_id_seq.NEXTVAL FROM dual; --- DECLARE V_DATE DATE; V_MEMBERID NUMBER(10); V_TITLE_ID NUMBER(10); BEGIN V_DATE:= SYSDATE; V_MEMBERID:= member_id_seq.NEXTVAL; V_TITLE_ID:= &digite_numero; result_title:= V_TITLE_ID; INSERT INTO reservation VALUES ((res_date, member_id, title_id) (V_DATE, V_MEMBERID, TO_CHAR(V_TITLE_ID))); DBMS_OUTPUT.PUT_LINE ('REGISTROS INGRESADOS CON EXITO!!!!!'); END;