SQL Error ORA-00913 too many values

0 votes

The table name, column names, datatype, and size of the two tables are all the same. These tables are in different databases, but I'm used to logging in as the HR user at the moment.

insert into abc.employees select * from employees where employee_id=100; 

I can not give use original query from corporate office.

Error starting at line 1 in command:
insert into abc.employees select * from employees where employee_id=100; 

Error at Command Line:1 Column:25
Error report:
SQL Error: ORA-00913: too many values
00913. 00000 -  "too many values"
*Cause:    
*Action:

Can someone please help me with this?

Sep 5, 2022 in Database by Kithuzzz
• 38,000 points
2,849 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

You should specify column names as below. 

insert into abc.employees (col1,col2) 
select col1,col2 from employees where employee_id=100; 

I hope this helps you.

answered Sep 6, 2022 by narikkadan
• 86,360 points

edited Mar 5

Related Questions In Database

0 votes
0 answers

ORA-06502: PL/SQL: numeric or value error: character string buffer too small

I experimented with the following code in ...READ MORE

Aug 22, 2022 in Database by Kithuzzz
• 38,000 points
8,233 views
0 votes
1 answer

SQL error "ORA-01722: invalid number"

When an effort is made to convert ...READ MORE

answered Feb 15, 2022 in Database by Neha
• 9,020 points
3,858 views
0 votes
0 answers

SQL Error: ORA-00942 table or view does not exist

I'm using SQL Developer, and after creating ...READ MORE

Sep 4, 2022 in Database by Kithuzzz