Insert: Multiple Column Table Or View (Not All Columns)

Description: INSERT example with multiple columns, tables, or views, not using all columns.

INSERT INTO <table_name>
(<comma_separated_column_name_list>)
VALUES
(<comma_separated_value_list>);
 
RENAME cars TO vehicles;
 
ALTER TABLE vehicles
ADD (car_color VARCHAR2(30));
 
INSERT INTO vehicles
(car_model, car_color)
VALUES
('Accord', 'Steel Gray');
 
COMMIT;
 
SELECT * FROM vehicles;

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.