ORACLE INSERT

FIRST WAY

INSERT INTO table (column1, column2, … column_n ) VALUES (expression1, expression2, … expression_n );

INSERT INTO trans
(id, name)
VALUES
(5000, 'Apple');

SECOND WAY

INSERT INTO table (column1, column2, … column_n ) SELECT expression1, expression2, … expression_n FROM source_table WHERE conditions;

INSERT INTO trans
(id, name)
SELECT id, name
FROM custom
WHERE id > 5000;
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: