Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 add columns

Author  Topic 

jung1975
Aged Yak Warrior

503 Posts

Posted - 2004-08-13 : 17:26:46
I have a column A and B

A
---
1
2
3
4
5
6

B
--
2
1
4
5
6
7
8

How do I make a table that has both column A andB?

A B
-- --
1 2
2 1
3 4
4 5
5 6
6 7
8




Sam Freeman
Starting Member

8 Posts

Posted - 2004-08-13 : 18:05:38
Not clear on the question - Col A and Col B - are they in 2 different tables? If not, pretty simple:

Use Employees
Select A, B
From Employees
Go

If more than one table, you need to join the tables:

SELECT Table1.A, Table2.B
FROM Table1 INNER JOIN Table2 ON Table1.ID = Table2.ID

Maybe we need more info....
Go to Top of Page
   

- Advertisement -