add column

Post Reply
sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

add column

Post by sourceuno »

I'm trying to add a column to a table that has a blob field in it. But when I copy the old table to the new one, it doesn't bring over the blob field. I use the following commands to do this:

tsql "create table newtable (field1 counter,field2 blob, newfield varchar(20))"
tsql "insert into newtable select field1,field2,'newfield' from sites"
tsql "drop table sites"
rename newtable.tbl sites.tbl
addtable sites.tbl
tsql "drop table newtable"

Do I need to add some commands to save the old blob file?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

add column

Post by mark »

You should also rename the newtable.blb file to sites.blb when you rename the table.
Post Reply