8
Folks good night I’m wanting to insert data into a table , which has a sequence created, but when trying to insert data with nextval it presents the following error
Error SQL Error: ORA-00911: invalid character
- 00000 - invalid"Haracter"
*Cause: Identifiers may not start with any ASCII Character other than Letters and Numbers. $#_ are also allowed after the first Character. Identifiers Enclosed by doublequotes may contain any Character other than a doublequote. Alternative Quotes (q'#...#') cannot use Spaces, tabs, or Carriage Returns as delimiters. For all other contexts, Consult the SQL Language Reference Manual.
CREATE TABLE CursoSequencia (
cod_curso NUMBER(3),
nome_curso VARCHAR2(30) NOT NULL,
carga_hor NUMBER(3),
CONSTRAINT cursoSquencia_cod_pk PRIMARY KEY(cod_curso)
);
CREATE SEQUENCE cod_curso INCREMENT BY 1
START WITH 1001;
INSERT INTO CursoSequencia VALUES(cod_curso.nextval, ‘AdministracaoOracle’,3);
INSERT INTO CursoSequencia VALUES(cod_curso.nextval, ‘AdministracaoSQLServer’,3);
Just to confirm... it’s Postgresql or Oracle?
– Camilo Santos
The key has three size the Quence starts from 1001 !?
– Motta
@Camilosantos the error already confirms that it is oracle. Felipe, I believe you put the postgresql tag by mistake.
– George Wurthmann
George, I did the removal of tag because the error is related to Oracle SQL. Postgresql does not present errors NOW.
– RXSD