Solved

meaning

Posted on 2015-01-14
4
84 Views
Last Modified: 2015-01-20
What is the meaning of this. What is happening here


insert into myobjects select * from myobjects;
0
Comment
Question by:jeevan mathew
4 Comments
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 40549416
You are creating two of every row in myobjects.

In other words: duplicating the data.

You are inserting into one table the results of a select.  In this case, the same table.
0
 
LVL 73

Expert Comment

by:sdstuber
ID: 40549421
that is effectively doubling your data.

"select * from myobjects" returns all rows and columns in the myobjects table.

"insert into myobjects" takes the result of the select statement and inserts all of those results into the table


note - if you have unique constraints or indexes on the table then it's likely the insert will fail because of duplicates on every row
0
 
LVL 12

Expert Comment

by:FarWest
ID: 40549427
if you are suspicious that it will go for infinite loop, no it will not,
The SQL Processor will fetch all rows before insert and then it will insert those rows
if data is large temp tables are used
0
 

Author Closing Comment

by:jeevan mathew
ID: 40560887
Thank you.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
query in Oracle forms Builder 2 51
Oracle DATE Column Space 11 79
C# Connection String for Oracle database is not working 22 140
ORA-00923: FROM keyword not found where expected 3 62
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question