简体   繁体   中英

Inserting a sequence of numbers SQL

I have a table 'Persons' which has a field 'ID' which is also a primary key. I tried this and I keep getting 'ORA-00933: SQL command not properly ended'. I'm a beginner at this. I'm using apex.

CREATE SEQUENCE idNmbrs INCREMENT BY 1 START WITH 100,
INSERT INTO Persons (ID) VALUES(idNmbrs.nextval);
CREATE SEQUENCE idNmbrs START WITH 100 INCREMENT BY 1;

INSERT INTO Persons (ID) VALUES(idNmbrs.nextval);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM