hi
i have one table and in this 30 column and empid
now i want to add these column data
how i do
i dont get any idea
plz give me code n idea to add every column on the basis of empid
How to add column data in MSSQL
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Santhosh NRank #4,788 · 325 reputationPosted Dec 20, 2010, 4:31 PM EST
INSERT INTO targetTable(col1, col2, col3,...)SELECT
col1, col2, col3,...FROM sourceTable
WHERE conditionIfRequired
Dharmesh SharmaRank #1,974 · 741 reputationPosted Dec 20, 2010, 7:57 PM EST
i wana add data of column of one table and insert data to in this table to another column
Dharmesh SharmaRank #1,974 · 741 reputationPosted Dec 20, 2010, 8:03 PM EST
SELECT (col1+col2+col3......................)
but i need some other idea like to add by trigger and more
Suthish NairRank #92 · 22.8K reputationPosted Dec 21, 2010, 11:49 PM EST
Still we are not able to understand your posted query.
Please explain the problem in detailed you facing and what the query is all about.
So we can help you. If your looking for copying data from table1 to table2, then like this..