Oracle Insert Too Many values

Asked

Viewed 182 times

0

Personal Good night I want to insert data in a table but it presents an error "Too Many values" I will put my code for you to analyze.

Insert into tab_Conta(id_correntista,id_banco, id_conta,id_agencia,nr_digito_conta,cd_tipo_correntista,vl_saldo) values(1,1,1,1,'123',1,'casa',10.00);

My information about table tab_Conta

inserir a descrição da imagem aqui

2 answers

1

You were passing more values to insert than declared columns to receive.

Try to run the Insert below:

insert into  tab_Conta (id_correntista,id_banco,id_conta,id_agencia,nr_digito_conta,cd_tipo_correntista,vl_saldo)values(1,1,1,1,123,1,10.00);
  • Foi man rodou.Thanks, man another question when trying to run an Insert with To_date it presents the following error. A non-numerical character was located where a numeric was expected. Comando insert tab_correntista(id_correntista,nm_nome,ds_sexo,nr_numero,id_municipio,id_cep,dt_nascimento) values(1,'Lucas','F',1,1,'12',TO_DATE('2003/05/03 21:02:44', 'yyyy/mm/dd hh24:mi:ss'));

0

Foi man rodou.Thanks, man another question when trying to run an Insert with To_date it presents the following error. a non-numerical character was located where a numeric was expected. My Oracle Command

insert tab_correntista(id_correntista,nm_nome,ds_sexo,nr_numero,id_municipio,id_cep,dt_nascimento) values(1,'Lucas','F',1,1,'12',TO_DATE('2003/05/03 21:02:44', 'yyyy/mm/dd hh24:mi:ss'));

My Stock Exchange Table

inserir a descrição da imagem aqui

  • Man the NM_NOME column is of the DATE type and you are passing a string, change the column type to VARCHAR2, code below: ALTER TABLE table table table table table table table table table table table table table modify (NM_NOME VARCHAR2(30)); and run your Insert.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.