January 2012
Intermediate to advanced
542 pages
11h 28m
English
In this recipe, we will see different ways to insert data in our tables and we will make some considerations about the INSERT statement's performance.
We will see how arrays can be used to speed up insert and select statements, and why it may be better to use a single statement to achieve certain goals than using a procedural approach.
The following steps will demonstrate the use of arrays to insert data into the tables:
SH schema:
CONNECT sh@TESTDB/sh
MY_SALES with the same structure as the SALES table:CREATE TABLE sh.MY_SALES AS SELECT cust_id, prod_id FROM sh.sales WHERE 1=0;
SET TIMING ON
Read now
Unlock full access