SQL Query for inserting multi column values in to single column

Posted by SARAVAN on Stack Overflow See other posts from Stack Overflow or by SARAVAN
Published on 2010-06-15T18:54:39Z Indexed on 2010/06/15 19:02 UTC
Read the original article Hit count: 461

Filed under:
|
|

I have Table "MultiCol" as below

Name LibraryID RegisterID EngineerID
Rahul 1002      4521       4854
Ajay  5072      3151       4833
Vimal 4532      4531       4354

I want to insert the Rahul's all IDs in the "SingleCol" table(shown below) which is having only one Column named "IDS"

So I want the Result as shown below

Table "SingleCol"

IDS
1002
4521
4854

Which query pattern will be most efficient in terms of time and space?

© Stack Overflow or respective owner

Related posts about sql

Related posts about insert