In the process of creating a small test table, I came across the following article on the Internet: ( http://www.techonthenet.com/sql/insert.php ), which gives the following solution on how to insert multiple rows of fixed values ββin Oracle:
Insert All
Into testTable (key, field1, field2) Values (1, 10, 'a')
Into testTable (key, field1, field2) Values (2, 20, 'b')
Into testTable (key, field1, field2) Values (3, 30, 'c')
Into testTable (key, field1, field2) Values (4, 40, 'd')
Select * from dual;
Using a double was something that I had not seen before, and so I started to do a little research to understand how this works. I understand that this table is a workaround for a specific oracle syntax, but how it performs theses tasks still don't click on me. I know others have asked a similar question ( How does Oracle SELECT FROM dual work with multiple fields ), but I have not yet seen anyone explain what is actually happening under the hood.
Is this a reference trick that they can perform using one valuable table, or are some functions in Oracle simply hardcoded to act differently when they see a double table?
More specifically, as a reference to it, the above code allows essentially to cyclically execute several Into ... Values ββ... instructions
Can anyone explain this to me?
source
share