Click here to Skip to main content
15,906,645 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can insert multipal data from table1 one column data can copy from another table2 from sql server..???


insert into Voterinfore(CustID,DID,SID)
select CustID from CustomerVoterInfo

Only one column data can copy from another table and DID and SID column can insert not copy data can insert
Posted
Updated 22-Apr-14 21:04pm
v2

1 solution

Hi,

You can use following query, let me know if it helps.
SQL
INSERT INTO Table1 (col1)
SELECT col1
FROM Table2


Thanks,
Hitesh
 
Share this answer
 
Comments
krishna97 23-Apr-14 3:03am    
my Question This one
insert into Voterinfore(CustID,DID,SID)
select CustID from CustomerVoterInfo
Only one column data can copy from another table and DID and SID column can insert not copy data can insert
Hitesh Varde 23-Apr-14 3:08am    
To be clear,
you are looking to insert CustId from CustomerVoterInfo into Voterinfore, and rest from Voterinfore remains the same?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900