Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OK I have 2 tables tblCommunity and

Status
Not open for further replies.

Mayoor

Programmer
Jan 16, 2004
198
0
0
GB
OK I have 2 tables tblCommunity and tblArea (which has 1 column)

I wish to add the column in tblArea to tblCommunity.

Does anyone know the SQL statement for this?
 
alter table tblCommunity
add your_col_name your_col_type

Dickie Bird (:)-)))
 
What do you mean add the column?

alter table tblCommunity add column mycol int null

If you want to add the data from tblArea then you will need join fields - unless tblArea has a single row and you want to update all rows in tblCommunity with that value.

Give some sample data and an example of the result you wish.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top