Hi all,
I am trying to write a SQL Querry that inserts rows into a table by selecting values from another tables.
General Syntax for inserting values into a table from one or more tables is as follows
INSERT INTO <table_name> | <view_name> [ ( <column_list> ) ] SELECT <column_list>
| <literal_value> FROM <table_name> | <view_name>
My querry looks something like this...
INSERT INTO <table_name> [ ( <column1, column2, column3, ...> ) ]
SELECT <column1, column2, (SELECT <column1> FROM <table_name> )>
FROM <table_name>
this works for me...
But my question is ... Can I use joins instead of these SubSelects?
If yes, please provide me with some ex code.
Many thanks.