Does SQL allow me to copy one field of a table to be inserted into another table?
I am thinking something along the following lines:
INSERT INTO TableTwo (
SELECT field_x FROM TableOne,
-- or --
SELECT * FROM TableOne WHERE some_field = 'something',
From what I have read, INSERT SELECT places one row of one table into another.
However, i have not seen anything that covers inserting a single field in the same manner.
Many thanks in advance for your assistance.
Hi leo rio ,
You can do this as long as your sub-query ,
"SELECT field_x FROM TableOne"
"SELECT * FROM TableOne WHERE some_field = 'something'"
Returns only 'one' ROW ( actullay 'one' VALUE).
What's wrong with:
select 'value one',field_x,'value three','value four'
where some_filed = 'something';
But question was about 'inserting a single field'.